bunyan -p '*'
This commit is contained in:
parent
6869931a60
commit
918c8081ca
2 changed files with 7 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
## bunyan 0.16.5 (not yet released)
|
||||
|
||||
- Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes.
|
||||
- issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to
|
||||
turn off all output coloring. This is still overridden by the `--color`
|
||||
and `--no-color` options.
|
||||
|
|
|
@ -403,8 +403,12 @@ function parseArgv(argv) {
|
|||
var pidArg = args.shift();
|
||||
var pid = +(pidArg);
|
||||
if (isNaN(pid)) {
|
||||
if (pidArg === '*') {
|
||||
pid = '*'
|
||||
} else {
|
||||
throw new Error(format('invalid pid: "%s"', pidArg));
|
||||
}
|
||||
}
|
||||
parsed.pid = pid;
|
||||
break;
|
||||
case "-l":
|
||||
|
@ -912,7 +916,7 @@ function processStdin(opts, stylize, callback) {
|
|||
function processPid(opts, stylize, callback) {
|
||||
var leftover = ""; // Left-over partial line from last chunk.
|
||||
var argv = ['dtrace', '-Z', '-x', 'strsize=4k', '-qn',
|
||||
format('bunyan%d:::log-*{printf("%s", copyinstr(arg0))}', opts.pid)];
|
||||
format('bunyan%s:::log-*{printf("%s", copyinstr(arg0))}', opts.pid)];
|
||||
var dtrace = spawn(argv[0], argv.slice(1),
|
||||
// Share the stderr handle to have error output come
|
||||
// straight through. Only supported in v0.8+.
|
||||
|
|
Loading…
Reference in a new issue