-
Notifications
You must be signed in to change notification settings - Fork 3
Cookbook: Configure Logging
DavidSouther edited this page Nov 28, 2014
·
4 revisions
Rupert's logger has 9 levels. From most to least promiscuous, they are 'silly'
, 'data'
, 'debug'
, 'verbose'
, 'http'
, 'info'
, 'warn'
, 'error'
, and 'silent'
. Default is 'http'
.
In the Rupert config object, the log
object has a property, level
. It should be a string, matching one of the above.
To change the log level for a single run, set the environment variable LOG_LEVEL
to a string value of one of the above.
Rupert logs http requests at the 'http'
level using morgan. Change the output format using log.level
in the Rupert config object, or for a single run with the LOG_FORMAT
environment variable. Default value is 'tiny'
, and valid are any [morgan formats][morgan_format]. At this time, it is not possible to define new morgan types for Rupert.