jazz icon indicating copy to clipboard operation
jazz copied to clipboard

logging improvements

Open Arnaz87 opened this issue 5 years ago • 9 comments

  • 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.

Arnaz87 avatar Oct 08 '18 23:10 Arnaz87

instead of print statements, if.verbose.enabled, every function log event: xyz executed

naturallymitchell avatar Oct 09 '18 00:10 naturallymitchell

When logging everything (with the log-scope option), log as well which module logged which messages.

Arnaz87 avatar Oct 09 '18 04:10 Arnaz87

Change the date to be gray and the log level to be colored like in https://github.com/rxi/log.lua

Arnaz87 avatar Oct 09 '18 05:10 Arnaz87

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)

Arnaz87 avatar Oct 10 '18 16:10 Arnaz87

what is the order of the levels in how much info they display?

naturallymitchell avatar Oct 10 '18 18:10 naturallymitchell

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

naturallymitchell avatar Oct 11 '18 06:10 naturallymitchell

image

naturallymitchell avatar Oct 11 '18 06:10 naturallymitchell

what about fatal?

naturallymitchell avatar Oct 11 '18 18:10 naturallymitchell

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

naturallymitchell avatar Nov 08 '18 19:11 naturallymitchell