--no-color option
This commit is contained in:
parent
92a2e9d005
commit
887f407807
2 changed files with 13 additions and 9 deletions
10
CHANGES.md
10
CHANGES.md
|
@ -4,10 +4,11 @@
|
||||||
|
|
||||||
- ANSI coloring output from `bunyan` CLI tool (for the default output mode/style).
|
- ANSI coloring output from `bunyan` CLI tool (for the default output mode/style).
|
||||||
Also add the '--color' option to force coloring if the output stream is not
|
Also add the '--color' option to force coloring if the output stream is not
|
||||||
a TTY, e.g. `cat my.log | bunyan --color | less -R`.
|
a TTY, e.g. `cat my.log | bunyan --color | less -R`. Use `--no-color` to
|
||||||
- Add 'level' field to log record before custom fields for that record. This just
|
disable coloring, e.g. if your terminal doesn't support ANSI codes.
|
||||||
means that the raw record JSON will show the 'level' field earlier, which is a bit
|
- Add 'level' field to log record before custom fields for that record. This
|
||||||
nicer for raw reading.
|
just means that the raw record JSON will show the 'level' field earlier,
|
||||||
|
which is a bit nicer for raw reading.
|
||||||
|
|
||||||
|
|
||||||
## bunyan 0.6.4
|
## bunyan 0.6.4
|
||||||
|
@ -155,4 +156,3 @@
|
||||||
## bunyan 0.1.0
|
## bunyan 0.1.0
|
||||||
|
|
||||||
First release.
|
First release.
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@ function printHelp() {
|
||||||
util.puts("");
|
util.puts("");
|
||||||
util.puts(" --color Colorize output. Defaults to try if output");
|
util.puts(" --color Colorize output. Defaults to try if output");
|
||||||
util.puts(" stream is a TTY.");
|
util.puts(" stream is a TTY.");
|
||||||
|
util.puts(" --no-color Force no coloring (e.g. terminal doesn't support it)");
|
||||||
util.puts(" -o, --output MODE");
|
util.puts(" -o, --output MODE");
|
||||||
util.puts(" Specify an output mode/format. One of");
|
util.puts(" Specify an output mode/format. One of");
|
||||||
util.puts(" paul: (the default) pretty")
|
util.puts(" paul: (the default) pretty")
|
||||||
|
@ -210,6 +211,9 @@ function parseArgv(argv) {
|
||||||
case "--color":
|
case "--color":
|
||||||
parsed.color = true;
|
parsed.color = true;
|
||||||
break;
|
break;
|
||||||
|
case "--no-color":
|
||||||
|
parsed.color = false;
|
||||||
|
break;
|
||||||
case "-o":
|
case "-o":
|
||||||
case "--output":
|
case "--output":
|
||||||
var name = args.shift();
|
var name = args.shift();
|
||||||
|
|
Loading…
Reference in a new issue