0.2.5 • Published 5 years ago

@machinomy/logger v0.2.5

Weekly downloads
16
License
Apache-2.0
Repository
github
Last release
5 years ago

Machinomy Logger

Machinomy logger. Works in browser and Node.

Basic usage

import Logger from '@machinomy/logger'

const LOG = new Logger('your-namespace')

LOG.info('This is info message')
LOG.warn('This is warn message')
LOG.error('This is error message')
LOG.fatal('This is fatal message')
LOG.debug('This is debug message')
LOG.trace('This is trace message')

Usage with LogDNA

import Logger from '@machinomy/logger'

const LOG = new Logger(
    'your-namespace',
    'LogDNA-Ingestion-Key-As-String',    // Ingestion Key from "API Keys" section of LogDNA website
    { hostname: 'another-host' }         // Any LogDNA for Node.js constructor options
 )

LOG.info('This is info message')
LOG.warn('This is warn message')
LOG.error('This is error message')
LOG.fatal('This is fatal message')
LOG.debug('This is debug message')
LOG.trace('This is trace message')

For more LogDNA options see LogDNA for Node.js

DO NOT FORGET TO DEFINE "DEBUG=*" ENV VARIABLE!

IF YOU USE @machinomy/logger AT MULTIPLE LAYERS OF YOUR SOFTWARE - DO NOT FORGET TO DEFINE "DEBUG_DEPTH=10" ENV VARIABLE!

Web site: machinomy.com. Twitter: @machinomy. Support/Discussion: Gitter.

:exclamation: Please, pay attention, this package is the part of Machinomy Lerna Monorepo and it's intended to use with other monorepo's packages.

:no_entry: You should not git clone this repository alone

:white_check_mark: You should git clone the main repository via

git clone https://github.com/machinomy/machinomy.git
or 
git clone git@github.com:machinomy/machinomy.git

For documentation, usage and contributing please see Machinomy Monorepo.

0.2.5

5 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago