Features
- Loosens typings of logger methods like
info
,debug
, etc.- The methods now accept multiple arguments.
- Passed arguments can have any type instead of only accepting a string.
- Added a
args: unknown[]
property toLogRecord
.- Property contains all arguments passed to a logger.
- The
message
property contains all arguments formatted to a string. Multiple arguments are separated by a space.
Examples:
logger.info({ key1: "value", key2: 123 }) // => "{"key1":"value",key2:123}"
logger.verbose("Hello", "World") // => "Hello Word"
logger.debug([1, 2, 3], [4, 5, 6]) // => "[1,2,3] [4,5,6]"
logger.warn((a,b) => a+b) // => "[Function (anonymous)]"
Documentation
- Changes issue badge to show the open issues instead of all issues.
Internal
- Removes auto mock clearing in jest.
- Upgraded dev-dependencies.