Skip to content

Console transport broken in AWS Lambda #1636

@karlismelderis

Description

@karlismelderis

Please tell us about your environment:

  • winston version?
    • winston@2
    • winston@3
  • _node -v outputs: nodejs8.10
  • _Operating System? AWS Lambda
  • _Language? ES6

What is the problem?

winston Console transport is missing Timestamp and request ID in AWS Lambda CloudWatch logs
e.g. 2019-04-15T12:47:57.129Z 3650fe89-33ea-12f4-3aec-77e4b0e3f45e

Every console.log has timestamp and ID attached so it's easy to search CloudWatch logs
but Winston Console transport is missing this automatically added info

if I delete these output options, Winston is forced to use console.log and console.error.
with this hack logging works as expected

delete console._stderr;
delete console._stdout;

What do you expect to happen instead?

an option to disable output to streams console._stderr and console._stdout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions