Skip to content

[Docs]: Fix wrong code on README.md documentation #2319

@viniciusteixeiradias

Description

@viniciusteixeiradias

🔎 Search Terms

Syntax error on README.md

The problem

https://github.com/winstonjs/winston#common-transport-options

Should be:

transports: [
    new winston.transports.File({
      filename: 'error.log',
      level: 'error',
      format: winston.format.json()
    }),
    new winston.transports.Http({ // add winston. before transports
      level: 'warn',
      format: winston.format.json()
    }),
    new winston.transports.Console({ // add winston. before transports
      level: 'info',
      format: winston.format.combine(
        winston.format.colorize(),
        winston.format.simple()
      )
    })
  ]

What version of Winston presents the issue?

v3.9.0

What version of Node are you using?

v16.8.0

If this worked in a previous version of Winston, which was it?

No response

Minimum Working Example

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions