adobe / aio-lib-core-logging

Node.js Logger module for use by the Adobe I/O SDK
https://adobe.io
Apache License 2.0
2 stars 4 forks source link

Double timestamps in runtime action logging #19

Open purplecabbage opened 4 years ago

purplecabbage commented 4 years ago

In my runtime action code, I am doing this:

const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-app-myapps/resolver', { provider: 'debug', level: 'debug' })
...
// and later
aioLogger.debug('resolver got a request')

When I look at the logs, I see this:

2020-03-10T22:35:04.802Z       stdout: 2020-03-10T22:35:04.802Z @adobe/aio-app-myapps/resolver:debug  resolver got a request

With the double time stamp, plus the stream name, plus a verbose debug namespace, there are 100 char before the message.

shazron commented 2 months ago

The debug log provider doesn't add a timestamp, so I'm not sure where the second timestamp shows up (winston does show a timestamp by default). The first timestamp is of course provided by Runtime.