1.0.5 • Published 5 years ago

djuke-logger v1.0.5

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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

  1. Specify your LogDNA ingestion key as an environment variable named LOGDNA_INGESTION_KEY
  2. 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'

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago