Releases: fullstack-build/tslog
Releases · fullstack-build/tslog
v2.6.4
v2.6.3
Bugfix Release
v2.6.1
New type: hidden
- Add new type: hidden 18aa5c7
Child loggers, RequestId, Secrets masking and more
This is a jam-packed release 🎉
Don't underestimate this minor version jump, it's only due to semver and its backward compatibility reasons. ;-).
- Child Loggers: Use
getChildLogger
to create a child logger based on the current instance, inherit all its settings including prefixes, and overwrite the ones you would like to change in this child. Makes it possible to follow a request all the way down (s. belowrequestId
) - Runtime settings changes: Use
setSettings()
to change settings during runtime. Changes will also propagate to every potential child logger but can also be overwritten along the way. Prefixes will be enhanced instead of overwritten. - requestId: Use
async_hooks
(e.g.AsyncLocalStorage
) to follow a request all the way down the promise chain (Example: Display all logs from Server down to DB) - Mask secrets: Use
maskValuesOfKeys
&maskStrings
to prevent tslog from printing secrets and sensitive information like passwords, secrets, api keys and Authorization Bearer - Prefix:
prefix
Prefix every log message with additional attributes that are also inherited to child loggers - Types:
displayTypes: true
Display types for all variables passed to tslog, eg.string: test number: 123
Execute RequestId function for every log
v2.5.0-1 2.5.0-1
Child logger, Secrets masking, requestID and more
Don't underestimate its minor version jump that is due to backward compatibility reasons. ;-).
- Child Loggers: Use
getChildLogger
to create a child logger based on the current instance, inherit all its settings including prefixes, and overwrite the ones you would like to change in this child. Makes it possible to follow a request all the way down (s. belowrequestId
) - Runtime settings changes: Use
setSettings()
to change settings during runtime. Changes will also propagate to every potential child logger but can also be overwritten along the way. Prefixes will be enhanced instead of overwritten. - requestId: Use
async_hooks
(e.g.AsyncLocalStorage
) to follow a request all the way down the promise chain (Example: Display all logs from Server down to DB) - Mask secrets: Use
maskValuesOfKeys
&maskValuesOfKeys
to prevent tslog from printing secrets and sensitive information like passwords, secrets, api keys and Authorization Bearer - Prefix:
prefix
Prefix every log message with additional attributes that are also inherited to child loggers - Type:
displayTypes: true
Display types for all variables passed to tslog, eg.string: test number: 123