Gentoo Archives: gentoo-user

From: Ran Shalit <ranshalit@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] local/user rsyslog
Date: Tue, 23 Feb 2016 17:21:54
Message-Id: CAJ2oMhJ-nessXHdF0jLHnU13yeX41rFaft96Vjk1Q4i+y-PZzw@mail.gmail.com
1 Hello,
2
3 I am trying to write to rsyslog from application.
4 With openlog(..., LOG_USER), it works fine and I find the log in
5 /var/log/user.log (it is defines in /etc/rsyslog.d/50-defaults.conf )
6 But we need to enable different applications to have each its own log file.
7 I tried to use LOG_LOCAL0 instead and configured it in
8 /etc/rsyslog.d/50-defaults.conf the same way as user:
9
10 local0.* action
11 {
12 type="omfile"
13 FILE="/var/log/local0.log"
14 FileOwner="root"
15 FileGroup="adm"
16
17 }
18
19 I then did
20 1. /etc/init.d/rsyslog stop
21 2. /etc/init.d/rsyslog start
22 I see no warnings or errors, and I started the application trying to
23 write to LOG_LOCAL0, But there is no new file created, no logs.
24
25 Is there any idea whatws wrong, or how I can achieve this multi user's logs ?
26
27 Thank you,
28 Ran