Skip to content

v0.5.0

Latest
Compare
Choose a tag to compare
@christoph-fricke christoph-fricke released this 19 Dec 16:52

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 to LogRecord.
    • 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.