Hi,

I am using rsyslogd 8.4.4 in Ubuntu 14.04. I want my applications logs to
be in a separate log file(ex : /var/log/mylog.log).Before I used rsyslog 5v
on ubuntu 12.04 for the same purpose and it worked. I used the following
snippet with rsyslog 5v serve my purpose.Following are the lines in my
application that writes logs to syslog.

 setlogmask (LOG_UPTO (LOG_NOTICE));
 openlog ("thelog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
 syslog (LOG_NOTICE, "thelog : started by User %d", getuid ()); closelog();

And the following lines in /etc/rsyslog.d/50-default.conf configuration file

local1.*                -/var/log/thelog.log

Now the above method no longer works with new rsyslog 8.4v. I even
tried the following line

if $syslogfacility-text == 'local1' then /var/log/mylog.log

Even this is not working. Can someone suggest me, how to do it.


Thanks in advance.

Regards,

Ravi
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to