djuke-logger v1.0.5
Important Notice
We do NOT recommend using this package at all. We are not responsible of how this package is used, if used, which we don't recommend.
Documentation
This package is a wrapper around LogDNA logger and console.log.
Setup
- Specify your LogDNA ingestion key as an environment variable named LOGDNA_INGESTION_KEY
- Specify the application name to appear in the LogDNA logs by setting the environment variable LOGGER_APP_NAME
How it works
The logs are routed to LogDNA only when process.env.NODE_ENV != 'production'.
Otherwise, logs will be routed to the local console.
How to use it
const logger = require('djuke-logger');
Available methods:
info (message: string, ...optionalParams: any[])
warn (message: string, ...optionalParams: any[])
debug (message: string, ...optionalParams: any[])
error (message: string, ...optionalParams: any[])
fatal (message: string, ...optionalParams: any[])
trace (message: string, ...optionalParams: any[])
Typescript
To use with Typescript, import the logger like:
import logger form 'djuke-logger'