-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Ability to log custom key/value pair outside of message
For example, passing an object:
logger.info({
message: 'The message to log',
path: '/api/path',
method: 'GET',
});Should record the path and method property at the root of the log message, not serialised within the message, even though these properties are not known by the logger. This is so that when using json as the log format, this properties can be exploited in the logs.
Lazily generated log messages
logger.debug(() => `Compute-expensive log message`);Providing a function to the logger should result in the function being executed ONLY if the targeted log level is enabled. This is so that expensive log message are only generated when they are actually needed in order to avoid impacting the performances unnecessarily. This is especially relevant for debug logs.
Reactions are currently unavailable