Skip to content

Feature request: use r.msg as message, rather than entire object #14

@airandfingers

Description

@airandfingers

At https://github.com/mcavage/node-bunyan-syslog/blob/master/lib/sys.js#L155, SyslogStream:write stringifies r, to be appended to the header as the "message" part of the syslog

I realize that bunyan is a JSON logger and that outputting JSON is what's expected of a bunyan log stream, but for our purposes we don't need or want the entire JSON object printed as the message, for three reasons:

  • it's redundant. bunyan-syslog already outputs hostname, name, level, and timestamp in the message header.
  • none of our other syslog logs are in JSON.
  • JSON is not very human-readable, and we can't simply pipe our syslog logs through the bunyan binary.

Is there a way around these issues, other than forking this repo and modifying the aforementioned line? If not, I'd like to request an option to use r.msg as the message instead of r.

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