Skip to content

Streamline CLI's logger #4602

Closed
Closed
@rosen-vladimirov

Description

@rosen-vladimirov

Is your feature request related to a problem? Please describe.
CLI's logger has different ways and methods to write output to the console:

  • using log4js in some cases
  • using console.log
  • using process.stdout.write
  • using process.stderr.write

This makes it difficult to determine which method should be used.

Also logger.error method prints to stdout, instead of printing to stderr.

Describe the solution you'd like
The idea is to use only log4js internally and pass data to it. Use appenders and layouts to format and print the messages.
This will allow using different appender when CLI is used as a command line and as a library.

Describe alternatives you've considered
Drop log4js and format the messages in CLI only. Handle levels and categories directly in CLI.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions