Skip to content

Winston containers problem with winston-syslog and solution  #208

@GreenHex

Description

@GreenHex

The Problem

When creating multiple loggers with winston.loggers.add('id', params) to create loggers in containers, winston-syslog doesn't log, other than for the primary process when protocol is set to udp4 (it works with tcp4). This is on Node.js v16.14.0 on Windows 10.

Potential Solution

Set this.socket.bind() to this.socket.bind({ port: 0, exclusive: true }) around line 323 of winston-syslog.js.

Apparently not a problem in Linux. This, despite node.js documentation mentioning, "When exclusive is true, however, the handle is not shared and attempted port sharing results in an error."

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