Log
@log(options)
Arguments
options
{ Object } Options object.target
{ String = "console" }logger
logs to the developer log,console
logs to the console stream, accessibleusing
mdctl tail
(see https://www.npmjs.com/package/@medable/mdctl-cli). Possible values (logger, console).level
{ String = "info" } The log level to use. Possible values (logger: ['warn', 'error', 'info', 'debug', 'trace'],console: ['warn', 'error', 'info'] ).
traceError
{ Boolean = false } If true, logs errors thrown from the method.traceResult
{ Boolean = false } If true, logs the method return value.roles
{ String[] | ObjectID[] = "*"} Limits logging to a list of rolesenvironment
{ String = "*" } Limits logging to an environment. Possible values (*, production, development).format
{ Function } A function to transform the log output. Takes a single argument (function(log) { return log }
)
Last updated