Skip to content

Feature request: To add "-v /dev/log:/dev/log" -like functionality in "--log-driver sysslog"  #13726

Closed

Description

@grayhemp

Hi,

Current implementation of the syslog logging driver can only send STDOUT and STDERR of the process running under container to the host's syslog with info and err levels accordingly. However, lots of software support logging to syslog natively, that allows to specify different parameters (like severity, facility, tag, etc) for different messages. By using STDOUT/ERR logging only we loose these abilities.

The idea is to make the syslog logging driver to also try mounting host's /dev/log to container'd /dev/log, so the software supporting logging to syslog could do this. Probably it would also be nice to redefine the message line of the syslog messages to reflect the container id like it is done for STDOUT/ERR currently.

Yes, I know that I can do it myself by specifying "-v /dev/log:/dev/log", but I think that it makes a lot of sense to have it supported natively by the driver.

Thoughts?

Thank you.

Activity

  1. added
    kind/feature
    on Jun 3, 2015
  2. malcolmgreaves commented on Jun 4, 2015

    @malcolmgreaves

    +1 : Just my 2 cents.

  3. inanna-malick commented on Jun 4, 2015

    @inanna-malick

    +1: seems reasonable.

  4. gdm85 commented on Jun 4, 2015

    @gdm85
    Contributor

    @grayhemp what you could do is run heka on host, and customize everything with its filters. So for example your heka could create the /var/run/dockerlog listening UDP socket and then you'd pass it to all containers (as /dev/log) with the volume syntax. I've submitted a working example of a native syslog receiver to heka, you might find it still there (although wasn't merged, AFAIK).

  5. grayhemp commented on Jun 8, 2015

    @grayhemp
    Author

    Well, my workaround is to run a syslog container mapping /dev/log on host and to do the same for other containers. What I'm suggesting is to make this more transparent. @gdm85, but thank you anyway, heka looks really interesting.

  6. gdm85 commented on Jun 9, 2015

    @gdm85
    Contributor

    @grayhemp yeah that'd work too. I mentioned heka because it has a huge customization surface

  7. cpuguy83 commented on Sep 15, 2015

    @cpuguy83
    Member

    Closing because I just don't think this is something that can be done in a reliable way across containers, and probably is not the job of the engine to handle this.
    I'd recommend if you want to talk to syslog directly then provide those socket details to your container process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/loggingkind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions