Skip to content

Verbosity Level? #396

Answered by antongolub
wrynegade asked this question in General
Apr 22, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

In v8.0.0 we've introduced additional option to fine-tune the output.

$.verbose = true   // to capture everything
$.quiet = true        // to completely turn off logging

The internal zx logger accepts an event object, that defines the context it belongs to. For example, the mentioned cmd evnt looks like:

$.log({
  kind: 'cmd',
  cmd: this._command,
  verbose: self.isVerbose(),
})

So you can easily override the $.log implementation to pick/omit only the required entries.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@antongolub
Comment options

Answer selected by antonmedv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
2 participants