Expand description
Verbose logging (zx log) and the command highlighter (zx formatCmd).
Entries are written only when they are verbose. Colors follow zx: the
command name is bright green, operators red, quoted strings bright yellow
and shell keywords bright cyan. format_cmd always colors (like zx with
a forced color level); Logger::stderr enables colors only when stderr
is a terminal and NO_COLOR is unset.
Structs§
Enums§
- LogEntry
- A log record (zx
LogEntry).
Functions§
- format_
cmd - Render a command as zx prints it in verbose mode (
$ cmd, continuation lines prefixed with>), with ANSI colors. - format_
cmd_ plain - Like
format_cmdwithout colors. - format_
entry - The default rendering of
entry(empty forendandkill). - log
- Log
entryto stderr whenverboseis set (errors are ignored).
Type Aliases§
- Formatter
- A custom renderer registered with
Logger::formatter.