@stemn/logger

0.0.4 • Public • Published

Logger

A logging class that wraps logs with metadata related to an instance of a service transaction

Logger.log

Appends...

  • service details
  • transactionId
  • epoch

Logger.detailed

Appends...

  • service details
  • transaction id
  • transaction initiation epoch
  • epoch
  • delta from transaction initiation
  • contents of the optional metadata object passed to the constructor

Logger.instrumentFunction

Returns a function instrumented with a logger. Each call logs...

  • function name
  • library if specified
  • service

A detailed option appends further data to the log as per Logger.detailed

Logger.warn

Logger.log with orange colouring

Logger.error

Logger.log with red colouring

Readme

Keywords

none

Package Sidebar

Install

npm i @stemn/logger

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

16.4 kB

Total Files

18

Last publish

Collaborators

  • capsicumbasket
  • mrblenny
  • nfour
  • sabrehagen
  • tomnlittle