You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
remove printMsgWithTimeout method from logger - it was used only in progress-indicator
remove warnWithLabel method from logger - it has been used on only two places and did not make sense to keep it.
deprecateout method from logger - its usage is replaced with logger.info
deprecatewrite method from logger - its intention was to print message on stdout, without modifying it (i.e. without adding new line, etc.), so replace it with info method and passing skipNewLine to true:
deprecate printInfoMessageOnSameLine method from logger - it was used to print messages on stdout without adding new line and only when log level is info. However, the implementation was incorrect (i.e. it was not checking the log level correctly). Replace the method with logger.info calls:
// OLD:this.$logger.printInfoMessageOnSameLine("Waiting for emulator device initialization...");// NEW:this.$logger.info("Waiting for emulator device initialization...",{[LoggerConfigData.skipNewLine]: true});
change logger.error to print to stderr instead of stdout.
deprecate printOnStderr method from logger. This can be achieve with any log level by passing useStderr: true. Usage is replaced with logger.error.
move all logger related files in a logger directory.
Is your feature request related to a problem? Please describe.
CLI's
logger
has different ways and methods to write output to the console:log4js
in some casesconsole.log
process.stdout.write
process.stderr.write
This makes it difficult to determine which method should be used.
Also
logger.error
method prints tostdout
, instead of printing tostderr
.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.The text was updated successfully, but these errors were encountered: