1.0.6 • Published 1 year ago

@mymunters/lambda-logger v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Simple logger for Node.js in AWS Lambda

Example

import { log } from '@mymunters/lambda-logger'

log.info('Hello world!')
log.info({ abc: 'Look, an object!'})
log.info('Multiple params can be sent', 12345, ['a', 'b', 'c'], true)

Change log level

import { log, LogLevel } from '@mymunters/lambda-logger'

log.level = LogLevel.DEBUG

Set default log level in environment variables

When imported, the logger looks for the environment variable MUNTERS_LOG_LEVEL to set the initial log level. This is optional

Example (env.yml)

dev:
  MUNTERS_LOG_LEVEL: DEBUG

test:
  MUNTERS_LOG_LEVEL: WARN

prod:
  MUNTERS_LOG_LEVEL: INFO

Available log levels are: DEBUG, INFO, WARN, ERROR and OFF

The default log level is INFO

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago