Write to several syslog services at the same time?

Is it possible for a single application to log multiple syslog objects at the same time?

I have an application written in C / C ++ that I would like to write some messages to local0 and other messages to local1. I do not want messages for local0 to be displayed in local1 or vice versa.

+4
source share
2 answers

Looking at the man page for syslog , I see an example:

 syslog(LOG_INFO|LOG_LOCAL2, "foobar error: %m"); 

whether

 syslog(LOG_INFO|LOG_LOCAL0, "message for local0"); syslog(LOG_INFO|LOG_LOCAL1, "message for local1"); 

Job?

+13
source

You cannot do this at a time. You will need to make a call for each object.

0
source

All Articles