-
Notifications
You must be signed in to change notification settings - Fork 22
Logging
TL;DR for developers: if you want to see your debug statements, turn on --verbose
.
Logging was added for prototype 3, using Winston. We are using the default logging levels (npm-style).
Ace creates a logfile in its own execution directory, called ace.log
. It is overwritten every time Ace is run. By default, the logfile contains the same contents as the console.
With no option specified, Ace logs error
, warning
, and info
messages. There are two new command line options: --verbose
and --silent
. The first causes Ace to display error
, warning
, info
, debug
, and verbose
messages. The second causes Ace to display no messages (messages are logged to file at info
level though).
Note: although Winston documentation seems to imply that verbose
is a less-detailed level of logging than debug
, in practice it seems that the reverse is true.
We could make this more configurable (and complicated). Some ideas for configuration options (perhaps best left to a config file rather than the command line?).
- The logfile name
- Whether to overwrite or append the logfile
- Have different logging levels for the console vs logfile
- Show debug statements by default in development mode
- Turn debug statements on and off separately from overall verbosity level