15.0.0 • Published 4 months ago

nightingale-app-console v15.0.0

Weekly downloads
86
License
ISC
Repository
github
Last release
4 months ago

Install

npm install --save nightingale-app-console

Usage

import { appLogger } from 'nightingale-app-console';

appLogger.info('hello');

Create children

const myServiceLogger = appLogger.child('services:myService');
myServiceLogger.debug('started');

The Logger class

See the Logger API, with all the methods you call to log things.

Library

If you're writing a library, use only nightingale-logger

Import the right bundle with webpack

Configure webpackConfig.resolve.mainFields:

  • node: env === 'production' ? ['module:node', 'module', 'main'] : ['module:node-dev', 'module:node', 'module-dev', 'module', 'main']
  • browser: env === 'production' ? ['browser', 'module', 'main'] : ['browser-dev', 'browser', 'module-dev', 'module', 'main']
  • modern browser: env === 'production' ? ['module:modern-browsers', 'browser', 'module', 'main'] : ['module:modern-browsers-dev','module:modern-browsers', 'browser-dev', 'browser', 'module', 'main']

Change default levels

Default level for app (appLogger and children): in production, Level.INFO () else Level.DEBUG Default level for lib: Level.INFO

You can use process.env.NIGHTINGALE_APP_MIN_LEVEL and process.env.NIGHTINGALE_LIB_MIN_LEVEL to change theses levels.

NIGHTINGALE_APP_MIN_LEVEL=0 node .

Use source maps to display error stack trace

15.0.0

4 months ago

14.2.0

6 months ago

14.2.1

6 months ago

14.1.0

9 months ago

14.0.0

10 months ago

14.0.1

10 months ago

14.0.2

10 months ago

13.0.0

1 year ago

12.0.0

2 years ago

12.0.1

2 years ago

12.1.2

2 years ago

12.1.3

2 years ago

12.1.4

2 years ago

12.1.0

2 years ago

12.1.1

2 years ago

11.8.0

2 years ago

11.8.1

2 years ago

11.7.4

2 years ago

11.9.0

2 years ago

11.7.2

2 years ago

11.7.1

3 years ago

11.7.0

3 years ago

11.6.0

3 years ago

11.5.2

3 years ago

11.5.1

3 years ago

11.5.0

3 years ago

11.4.0

3 years ago

11.3.0

3 years ago

11.2.0

3 years ago

11.1.1

3 years ago

11.1.0

3 years ago

11.0.5

3 years ago

11.0.3

3 years ago

11.0.4

3 years ago

11.0.2

3 years ago

11.0.1

3 years ago

11.0.0

3 years ago

10.0.0

4 years ago

10.0.1

4 years ago

3.2.6

5 years ago

3.2.5

5 years ago

3.2.4

5 years ago

3.2.3

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

8 years ago