Skip to content

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.

  • All logs are written to stderr. Only output information specifically meant as the return output from a command will be written to stdout. 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
Type prefixes
INFO General information that should always be shared
ERR Error output. The command will exit with a non-zero exit code.
WRN Worth calling out, but things will continue without a problem
LOG Slightly more verbose information when it's helpful
DBG Included when you really want to know what's goin on

Most 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:

Log types within a step
β”Œ Example success step
β”‚ INFO General information that should always be shared
β”‚ WRN Worth calling out, but things will continue without a problem
β”‚ LOG Slightly more verbose information when it's helpful
β”” βœ” 0ms
β”Œ Example step with an error
β”‚ INFO General information that should always be shared
β”‚ ERR Some error output information
β”‚ ERR that may be on multiple lines
β”‚ LOG Slightly more verbose information when it's helpful
β”” ✘ 0ms

When a command completes, a message will be shown, including whether or not it had errors and how long the entire command took to run:

Completed successfully
β–  βœ” Completed 5ms

This command finished cleanly with exit code 0.

Completed, but failed
β–  ✘ Completed with errors 5ms

This command did not exit cleanly and provide a non-zero exit code.

All 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:

ValueWhatDescription
--silentSilentNo output will written.
-v (default)Error & InfoError and general info output will be provided.
-vvWarningsWarnings and all preceding verbosity levels.
-vvvLogLogs and all preceding verbosity levels.
-vvvvDebugAll preceding verbosity as well as extra debug information.
-vvvvvTimingAll verbosity levels as well as performance timing entries.