0.2.2 • Published 1 year ago

pino-logger-client v0.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

pino-logger-client

Small logging library that also send logs to a configurable endpoint

Usage

  • Install client using npm install pino-logger-client --save from npm
  • Import with import { Logger } from 'pino-logger-client'
  • Instantiate and configure the logger class with const logger = new Logger(API_URL | false, LoggerName);, LoggerName is the name that will appear in the logs, it's also optional.
  • if API_URL is false nothing will be sent to API, this is preferable for local development.
  • Use its methods logger.info|warn|error|success('message')
  • The logger also registers some global error listeners, which can be unregisterd with logger.unregisterListeners()

Local development console helper

When process.env is not production then any log will appear in the browser console like this:

This is part of pino-h3-elastic-logger

TODO: Some things are not working properly.

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago