Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #4615
Closed
Open
Issue created Nov 26, 2019 by Administrator@rootContributor

[REQ] Log colouration

Created by: ybelenko

Is your feature request related to a problem? Please describe.

Right now it's hard to distinguish WARN/DEBUG/ERROR console messages in Macos Terminal. Most of time I ignore these messages, because it looks like INFO noise to me. When you generate the same build over and over again you just check error exit code or something red/yellow coloured in terminal output. If everything white or grey so it looks like nothing bad happened.

Describe the solution you'd like

I think it would be great to add an option of color output to all generators, like it works in maven or other significant libraries.

This line of code works in MacOs Terminal, but we need more global solution.

LOGGER.warn("\u001B[33m" + "Yellow message" + "\u001B[0m");

Describe alternatives you've considered

@Fjolnir-Dvorak suggested log-colouration pipelines. See quotes below.

Additional context

Quotes from Slack conversation:

@jimschubert says:

Another consideration is that we support creating custom standalone generators. Adding colors affects those. See, for example, Apache ServiceComb Toolkit.

@wing328 says:

As a workaround, what about simply grepping for WARN or ERROR in the output ?

@Fjolnir-Dvorak says:

For maven there are log-colouration pipelines. I think that would be the best for openapi-generator, too. If you want coloured output pipe it through a colourization pipe / shell script. That is in my opinion the most versatile and best solution. That could also be added to the wrapper script and could be enabled via a --colour (or the american --color 🇺🇸) flag

Assignee
Assign to
Time tracking