jazz
jazz copied to clipboard
logging improvements
- remove actix-something noise in debug and trace mode
- remove starting space in lua logs
To select the logging level, start torchbear with the --log
option with the most verbose level acceptable, between error, warn, info, debug and trace. Default is info, it's used if no log option is specified.
instead of print statements, if.verbose.enabled, every function log event: xyz executed
When logging everything (with the log-scope option), log as well which module logged which messages.
Change the date to be gray and the log level to be colored like in https://github.com/rxi/log.lua
log the same levels on the terminal and in the files (currently terminal logs whatever passed as the option level and files only log info)
what is the order of the levels in how much info they display?
in lighttouch, Aleksander is adding log messages to generated lua code for actions and rules when they are about to execute, when finished, and when conditions evaluated true .. https://github.com/foundpatterns/lighttouch-libs/issues/9
what about fatal?
Arnaud CastellanosToday at 11:14 AM verbose is confusing because in some applications I've seen verbose used more or less as an alias to --log debug or trace and having it off means --log error I like scope because this option is honestly kind of weird, I haven't seen that kind of options in other software, and the name matches that Maybe gcc has something similar to turn on or off the logs from the linker and the assembler and that stuff gcc or some other compiler
-> https://github.com/foundpatterns/torchbear/issues/53