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.21.0 to 1.23.0

5

__tests__/correlation-ids.js

@@ -12,3 +12,6 @@ // These tests are put aside in a separate file because the presense of correlation IDs

const consoleLog = jest.fn()
global.console.log = consoleLog
global.console.debug = consoleLog
global.console.info = consoleLog
global.console.warn = consoleLog
global.console.error = consoleLog

@@ -15,0 +18,0 @@ beforeEach(consoleLog.mockReset)

@@ -10,3 +10,6 @@ process.env.AWS_REGION = 'us-east-1'

const consoleLog = jest.fn()
global.console.log = consoleLog
global.console.debug = consoleLog
global.console.info = consoleLog
global.console.warn = consoleLog
global.console.error = consoleLog

@@ -13,0 +16,0 @@ beforeEach(consoleLog.mockClear)

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

# [1.23.0](https://github.com/getndazn/dazn-lambda-powertools/compare/v1.22.1...v1.23.0) (2020-04-06)
### Features
* **logger:** use the correct console logging methods ([036c00d](https://github.com/getndazn/dazn-lambda-powertools/commit/036c00d2ddb62374cd7546d55de78aca9319cfab))
# [1.21.0](https://github.com/getndazn/dazn-lambda-powertools/compare/v1.20.0...v1.21.0) (2020-02-09)

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

9

index.js

@@ -74,4 +74,11 @@ const CorrelationIds = require('@dazn/lambda-powertools-correlation-ids')

const consoleMethods = {
DEBUG: console.debug,
INFO: console.info,
WARN: console.warn,
ERROR: console.error
}
// re-order message and params to appear earlier in the log row
console.log(JSON.stringify({ message, ...params, ...logMsg }, (key, value) => typeof value === 'bigint'
consoleMethods[levelName](JSON.stringify({ message, ...params, ...logMsg }, (key, value) => typeof value === 'bigint'
? value.toString()

@@ -78,0 +85,0 @@ : value

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

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

"dependencies": {
"@dazn/lambda-powertools-correlation-ids": "^1.8.2"
"@dazn/lambda-powertools-correlation-ids": "^1.23.0"
},

@@ -19,3 +19,3 @@ "publishConfig": {

},
"gitHead": "07fd626eb4acedc59f99da85d24ab3811951a831"
"gitHead": "7ff4efd09caa266d7256e858e609fe8cf84d0df2"
}
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