Skip to content

Commit

Permalink
#1041: added new option --noLogColors for output in vscode extension
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Jul 19, 2023
1 parent 10aefe6 commit c169105
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,10 @@ yargs
type: 'boolean',
description: 'Only output errors to CLI',
})
.option('noLogColors', {
type: 'boolean',
description: 'do not use color codes in CLI log output',
})
.option('noLogFile', {
type: 'boolean',
description: 'Only output log to CLI but not to files',
Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Mcdev {
'fromRetrieve',
'json',
'like',
'noLogColors',
'noLogFile',
'refresh',
'schedule',
Expand Down
4 changes: 3 additions & 1 deletion lib/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ const Util = {
// Write logs to Console
level: Util.OPTIONS.loggerLevel || 'info',
format: winston.format.combine(
winston.format.colorize(),
Util.OPTIONS.noLogColors
? winston.format.uncolorize()
: winston.format.colorize(),
winston.format.timestamp({ format: 'HH:mm:ss' }),
winston.format.simple(),
winston.format.printf(
Expand Down

0 comments on commit c169105

Please sign in to comment.