You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We switched from Winston to use your logger because it has many features we need out of the box. But then we realized that the loggings are not pure JSON anymore.
What went wrong?
Logs ingested into CloudWatch from our lambda which uses power-logger are not pure JSON. There is a row of plaintext metadata at the beginning of each log entry.
Implementation:
import log from '@dazn/lambda-powertools-logger'
log.info('foo', { bar: 'jar' })
Workaround
We forked the lambda-powertools-logger to explicitly log into process.stdout/.stderr. Could probably open a PR if your intention is to log pure JSON?
Additional Data
Which powertool package are you using?: lambda-powertools-logger
Which version are you using?: lambda-powertools-logger: 1.24.1
Middy engine version you're using: 1.4.0
Operating System: Lambda runtime Node 12.x
The text was updated successfully, but these errors were encountered:
This is a Bug Report
Description
We switched from Winston to use your logger because it has many features we need out of the box. But then we realized that the loggings are not pure JSON anymore.
Logs ingested into CloudWatch from our lambda which uses power-logger are not pure JSON. There is a row of plaintext metadata at the beginning of each log entry.
Implementation:
will result in CloudWatch log like:
Only JSON
should've been logged into CloudWatch.
We forked the lambda-powertools-logger to explicitly log into
process.stdout/.stderr
. Could probably open a PR if your intention is to log pure JSON?Additional Data
The text was updated successfully, but these errors were encountered: