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

winston log provider: add ability to modify config for showing/hiding timestamp #54

Open shazron opened 2 months ago

shazron commented 2 months ago

If you choose the winston log provider, it adds a timestamp by default. Add an option in the config to not show the timestamp, and also the ability to turn on/off timestamp after initialization.

Proposed

// init winston logger (timestamp is true by default for backwards compat)
const aioLogger = require('@adobe/aio-lib-core-logging')('App', {provider:'winston', timestamp: false })
// turn on the timestamp later 
aioLogger.config.timestamp = true // use a setter
aiojbot commented 2 months ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2958