Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dazn/lambda-powertools-logger

Package Overview
Dependencies
Maintainers
6
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dazn/lambda-powertools-logger - npm Package Compare versions

Comparing version 1.15.2 to 1.21.0

13

__tests__/index.js

@@ -32,6 +32,7 @@ process.env.AWS_REGION = 'us-east-1'

const paramsAreIncluded = log => {
log('test', { id: 42, name: 'theburningmonk' })
log('test', { id: 42, name: 'theburningmonk', bigInt: BigInt(5) })
verify(x => {
expect(x.id).toBe(42)
expect(x.name).toBe('theburningmonk')
expect(x.bigInt).toBe('5')
})

@@ -80,3 +81,3 @@ }

const expected = new Set(enabledLevels)
const allLevels = [ 'DEBUG', 'INFO', 'WARN', 'ERROR' ]
const allLevels = ['DEBUG', 'INFO', 'WARN', 'ERROR']
allLevels.forEach(level => {

@@ -140,6 +141,6 @@ process.env.LOG_LEVEL = level

describe('Log level', () => {
it('enables debug logs at DEBUG level', () => enabledAt('debug', [ 'DEBUG' ]))
it('enables info logs at DEBUG and INFO levels', () => enabledAt('info', [ 'DEBUG', 'INFO' ]))
it('enables warn logs at at DEBUG, INFO and WARN levels', () => enabledAt('warn', [ 'DEBUG', 'INFO', 'WARN' ]))
it('enables error logs at all levels', () => enabledAt('error', [ 'DEBUG', 'INFO', 'WARN', 'ERROR' ]))
it('enables debug logs at DEBUG level', () => enabledAt('debug', ['DEBUG']))
it('enables info logs at DEBUG and INFO levels', () => enabledAt('info', ['DEBUG', 'INFO']))
it('enables warn logs at at DEBUG, INFO and WARN levels', () => enabledAt('warn', ['DEBUG', 'INFO', 'WARN']))
it('enables error logs at all levels', () => enabledAt('error', ['DEBUG', 'INFO', 'WARN', 'ERROR']))
})

@@ -146,0 +147,0 @@

@@ -6,2 +6,13 @@ # Change Log

# [1.21.0](https://github.com/getndazn/dazn-lambda-powertools/compare/v1.20.0...v1.21.0) (2020-02-09)
### Features
* **logger:** added support for BigInt ([e745d02](https://github.com/getndazn/dazn-lambda-powertools/commit/e745d02))
## [1.15.2](https://github.com/getndazn/dazn-lambda-powertools/compare/v1.15.1...v1.15.2) (2019-11-14)

@@ -8,0 +19,0 @@

@@ -75,3 +75,6 @@ const CorrelationIds = require('@dazn/lambda-powertools-correlation-ids')

// re-order message and params to appear earlier in the log row
console.log(JSON.stringify({ message, ...params, ...logMsg }))
console.log(JSON.stringify({ message, ...params, ...logMsg }, (key, value) => typeof value === 'bigint'
? value.toString()
: value
))
}

@@ -78,0 +81,0 @@

{
"name": "@dazn/lambda-powertools-logger",
"version": "1.15.2",
"version": "1.21.0",
"description": "Logger that is tightly integrated with the rest of the lambda-powertools",

@@ -18,3 +18,3 @@ "main": "index.js",

},
"gitHead": "a4dd6d0bfebdd129b1efcdae856bcc55a07c4609"
"gitHead": "07fd626eb4acedc59f99da85d24ab3811951a831"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc