Closed amisevsk closed 3 weeks ago
There's some oddness in the color selections -- I'd ideally like [TRACE]
to be a dim grey, but some color themes (looking at you, solarized on gnome terminal) use the same color for background and "dark grey" making it invisible.
I kind of wish we could implement a Logger struct that encapsulate and abstract away this.
I agree, though at this point, that's basically what we've done -- the struct would just encapsulate what are now package globals :shrug:
I can open a follow-up PR to clean it up a little. The cleanest in-package solution would be to do away with info
, debug
, error
functions and just use log(LEVEL, ...)
but that makes every invocation a little messier
Description
Add support for multiple log levels (
error
,warn
,info
,debug
, andtrace
) with a corresponding flag--log-level
. The old-v | --verbose
flag is left in place for convenience. Currently, the only 'trace' level logging is per-request info while pushing/pulling a registry. Also, if the log-level is notinfo
, we output a prefix indicating log level for each line, to make it a little more readable.If the log-level is 'info", the output is unchanged.
Linked issues
Closes #338