Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Problem with Multiple Syslog Loggers #6

tilo opened this Issue · 8 comments

4 participants


I'm using multiple Syslog::Logger instances, and am experiencing a problem with it.

The Syslog::Logger instance that gets created first, gets log messages from all the other Syslog::Logger facilities as well, prefixed by their facility name - it also correctly logs it's own data without prefix.


This is a restriction of syslog(3).

Syslog uses openlog(3), but openlog(3) doesn't allow multiple names to be used for the same program. Managing switching between the various possible names is too difficult and error-prone to implement, unfortunately.

This behavior is described in the documentation:

@drbrain drbrain closed this

thank you for the quick reply..


it should still be possible to write to multiple Syslog facilities from one program...

@drbrain drbrain reopened this

I think you are right, reopened.


apparently with Lumberjack one can specify the facility as an option.
see: lumberjack_syslog_device-1.0.0/lib/lumberjack_syslog_device.rb



In Ruby 2.1 Syslog::Logger has support for writing to multiple facilities from the same app. See:


I've found gem that logs to syslog using tcp/udp:
So you can have several loggers open at the same time with different progname - something that is unreachable for stdlib syslog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.