Skip to content

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

@shazron

Description

@shazron

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions