On Wed, 24 Feb 2016, Ran Shalit wrote:
Hello,
I am trying to write to rsyslog from application to different files.
Trying to log to local0, ...local7 failed:
I've made changes in .conf, and restart rsyslog, and used LOG_LOCAL0
with openlog,
But nothing helped.
local0.* action
{
type="omfile"
FILE="/var/log/local0.log"
FileOwner="root"
FileGroup="adm"
}
use () not {}
run rsyslogd -N2 to have it do a syntax check of your config and fix what it
complains about.
David Lang
If local0...local7 does not work:
Is there any other way from local0..local7 to make syslog write to a
different file in each application ?
yes, you can do things like
if $programname == "myappname" then /var/log/myapp.log
there are lots of things available, you don't have to stick with the traditional
facility definitions. Most people doing a lot of logging ignore that and just do
filtering based on the program names instead.
take a look at the logging articles that I wrote that are available at
https://www.usenix.org/publications/login/david-lang-series
_______________________________________________
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.