Skip to content

Logging

Marisa DeMeglio edited this page Aug 31, 2017 · 3 revisions

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: Ace will display and log error, warning, info, debug, and verbose messages.
  • --silent: Ace will display no messages but will log messages to file at info level

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
Clone this wiki locally