Skip to content

log/syslog: using log flags and a tag at the same time #5689

@gopherbot

Description

@gopherbot

by pierre.louis.roman:

syslog.NewLogger() allow me to specify flags but not a tag; if I want one, I have to
copy/paste the code of this function and replace the "" with my tag.
Code: http://golang.org/src/pkg/log/syslog/syslog.go#L271

How about a third argument for this function in order to allow the user to specify a tag?
The (very small) patch can be found in the attached files. Maybe the format of the diff
isn't the expected one, but the patch is easily reproductible.

go test works fine with it.

Which operating system are you using?
linux/amd64

Which version are you using?  (run 'go version')
1.1

Attachments:

  1. diff_syslog.go (501 bytes)
  2. diff_syslog_test.go (337 bytes)

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