Open aschrijver opened 3 years ago
I like the idea. I hadn't pursued it yet because:
1) Golang tends to rely on global logging variables
2) Golang tends to have separate os.StdErr
and os.StdOut
loggers
3) Other libraries I've found add yet more loggers (for different levels) or have other behaviors that are weird to set up
I haven't found a satisfactory approach, hence the current "verbose everywhere" in lieu of a good strategy.
Thoughts?
Note: I am also branching this from #56:
- Script output
Most of the INFO logging (application output) is too much to be part of the script output. I'd consider adding some additional script logging e.g. "Loading templates..." and then have a verbose -v flag to show INFO e.g. "Templates found..".
(Additionally - different issue - there's the question to separate INFO + DEBUG output, e.g. for the latter "Calling sql.Open...")
This feedback is based on my apcore example installation experience.
An example of log output of
./example init-db
:Lotsa output. The individual templates loading might be DEBUG level info, giving with loglevel == INFO:
Another example:
Possible output with loglevel == DEBUG:
Note: Made some changes to log message style. TBD... E.g. if you log a "Loading..." msg, should it be followed by a "Loaded [success]" msg?