1.0.4 • Published 2 years ago
@mdsdev/logger v1.0.4
@mdsdev/Logger Synopsis
Logger that is tightly integrated with correlation Ids Features: structured logging with JSON includes a number of common attributes: awsRegion, functionName, functionVersion, functionMemorySize and environment allow log level to be changed live via the LOG_LEVEL environment variable
Code Example
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
Installation
Two uses cases tested as is , insert and update, delete works for multiple and 1 id
$ npm install @mdsdev/logger
Uses
const {Logger} = require('@mdsdev/logger')
Logger.debug('this is not logged')
const undoDebugLog = Logger.enableDebug()
Logger.debug('this is logged')
undoDebugLog()
Logger.debug('this is not logged')
Logger.warn('this is a warning message with attributes', { dlxError: 'Dlx Error' })