Reading log output
One of oneRepoβs main tenets is to have clear and understandable log output. Other task runners and tooling tend to either give you too much or too little output with cryptic and confusing patterns. You may often be presented with interleaved output from parallel tasks, making it difficult to trace what has happened and in what order.
Key details
Section titled Key details- All logs are written to
stderr
. Only output information specifically meant as the return output from a command will be written tostdout
. This ensures that capturing and redirecting appropriate output is easy and consistent across all commands. - If the current environment implements TTY:
- Output will be buffered
- An animated spinner will indicate progress
- Parallel asynchronous steps will be visible
- Log type prefixes will be colorized
Prefixes
Section titled PrefixesMost commands will group and categorize work within LogSteps. These groupings aid in finding information quickly and determining where work is happening.
When steps succeed, they will end with a check mark and the amount of time that the entire step took to run:
Command completion
Section titled Command completionWhen a command completes, a message will be shown, including whether or not it had errors and how long the entire command took to run:
This command finished cleanly with exit code 0
.
This command did not exit cleanly and provide a non-zero exit code.
Controlling verbosity
Section titled Controlling verbosityAll commands through the one
CLI accept the verbosity
flag to control how much or how little information will be printed to stderr
. Control this output using either --silent
, or by increasing the number of v
characters with -v
:
Value | What | Description |
---|---|---|
--silent | Silent | No output will written. |
-v (default) | Error & Info | Error and general info output will be provided. |
-vv | Warnings | Warnings and all preceding verbosity levels. |
-vvv | Log | Logs and all preceding verbosity levels. |
-vvvv | Debug | All preceding verbosity as well as extra debug information. |
-vvvvv | Timing | All verbosity levels as well as performance timing entries. |