5.0.1 • Published 9 months ago

lambda-monitor-logger v5.0.1

Weekly downloads
1,089
License
MIT
Repository
github
Last release
9 months ago

lambda-monitor-logger

Build Status Test Coverage Dependabot Status Dependencies NPM Downloads Semantic-Release Gardener

Logging designed to be used with lambda-monitor

Install

Install with npm:

$ npm install --save lambda-monitor-logger

Usage

import { logger, abbrev } from 'lambda-monitor-logger';

logger.error('Keyboard not found. Press F1 to Resume');
// => ERROR: Keyboard not found. Press F1 to Resume

logger.error(abbrev('some really long text'));
// => ERROR: some ... test

This logger will simply log to console and prefix with the debug level.

The available levels are: debug, info, warning, error, critical.

Synonyms like warn are available and the mapping can be found in the source code.

Log Level

The log level can be set through the environment variable LOG_LEVEL (defaults to DEBUG).

Log messages below the currently set log level are completely ignored.

Abbrev Options

stripLineBreaks

Type: boolean Default: true

When set to true, line breaks are stripped.

maxLength

Type: integer Default: 512

The maximum output length.

replace

Type: Array Default: []

Input needs to be of format [[<STRING|REGEX>, <STRING|FUNCTION>], ...]

Allow custom replacement rules

5.0.1

9 months ago

5.0.0

9 months ago

3.3.0

2 years ago

4.0.0

2 years ago

3.2.2

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.4.10

3 years ago

2.4.11

3 years ago

2.4.9

3 years ago

2.4.8

3 years ago

2.4.7

3 years ago

2.4.6

4 years ago

2.4.5

4 years ago

2.4.4

4 years ago

2.4.3

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.5

4 years ago

2.2.4

4 years ago

2.2.3

4 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago