Optional
configBasic config that is used for various logging aspects. Values of note:
logLevel
- used to decide if log should be written or skipped altogether because it's level value is (numerically) higher than configured value. (e.g. if ERROR (1) is configured, DEBUG (4) logs are skipped)isProd
- if logLevel is not defined for some reason or defined incorrectly, this value is used to determine the value of logLevel
above. if true - INFO, if false - DEBUG.secureLoggingMode
- if UNSAFE_DEBUG_UNSAFE
is used - logs are written in debug mode, which in default implementation would write a log with both masked and unmasked values for debugging purposes.logMaskKeywords
- used for deciding which logs to mask and which not to mask.isDev
- skips writing component
property to Log object.serviceId
- information property written directly to matching Log properties. Written only in non-dev mode and appear as component
in the log.Optional
contextValue to be written directly into Log.context property. Useful to figure out location of origin of a log.
'DEFAULT'
Optional
logA custom function that is called before writing the log file to customize to log format
Optional
logMiddleware functions that are applied in the given order to change the log details object before writing the log.
Optional
maskMiddleware function that is used to mask logs. If not specified - default masking middleware is used.
Optional
skipMiddleware function that is used to skip logs masking. If not specified - logs will be masked based on maskMiddleware without custom skips.
It is also possible to modify selected properties of a log using this middleware (properties include message
, details
and error
).
Generated using TypeDoc
Options to configure default value for a Logger instance.