Skip to content

Commit

Permalink
added ability to disable colorize for lytics watch output
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Conn committed Aug 4, 2018
1 parent 3352327 commit 84e0f0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"type": "node",
"request": "launch",
"name": "Lytics Watch",
"program": "${workspaceFolder}/dist/index-watch.js",
"program": "${workspaceFolder}/dist/lytics-watch.js",
"args": [
"watch",
"-k",
"[!!! API key !!!]",
"-m",
"2",
"${workspaceFolder}/src/test"
"[!!! folder to watch !!!]"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lytics-js",
"version": "0.0.7",
"version": "0.0.8",
"description": "Work with the Lytics REST API using JavaScript",
"main": "./dist/lytics.js",
"files": [
Expand Down
3 changes: 3 additions & 0 deletions src/lytics-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ commander
.option('-k, --key <key>', 'Lytics API key (if not specified, environment variable LIOKEY is used)')
.option('-m, --max <max>', 'Maximum number of records read from the data file (default: 5)', parseInt)
.option('-l, --log <log>', 'Log level', /^(error|warn|info|verbose|debug)$/i, default_log_level)
.option('-C, --no-color', 'Disable colorized JSON output')
.parse(process.argv);
main();

Expand Down Expand Up @@ -70,6 +71,8 @@ async function main() {
logger.info(`Changing log level: ${logger.level} => ${commander.log}`);
logger.level = commander.log;
}
jsome.params.colored = commander.color;
logger.info(`Colorize JSON output: ${commander.color}`);
startWatch(dirs, maxrecords, apikey);
}

Expand Down

0 comments on commit 84e0f0c

Please sign in to comment.