guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCHES] Syslog produces no log (just for me?)


From: Alex Kost
Subject: Re: [PATCHES] Syslog produces no log (just for me?)
Date: Mon, 30 Mar 2015 10:23:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Ludovic Courtès (2015-03-29 17:03 +0300) wrote:

> Alex Kost <address@hidden> skribis:
>
>> Hello, I noticed that my /var/log/messages (and other log files and
>> tty12) were not filled anymore.  I found that the problem is in
>> "syslog.conf": when the "rule" lines begin with spaces, they are
>> ignored, so I'm attaching a patch to fix it.¹
>>
>> The strange thing is it worked earlier (with the same config) and since
>> nobody noticed that before, I have a feeling that it might be the
>> problem on my computer.  So I appreciate if someone confirms that the
>> problem really exists.
>
> If definitely works on my machine.  Could it be that your in-store
> syslog.conf has actually been altered or something?  Does syslogd print
> an error message in the console when it starts?

Nope, syslog.conf in store is fine.  The problem can be definitely
solved for me by removing leading spaces.  Actually never mind, as I'm
going to use my config for syslog-service, but anyway here is what
happens when I start syslogd with the conf-file of the same contents as
provided by 'syslog-service':

--8<---------------cut here---------------start------------->8---
# /run/current-system/profile/libexec/syslogd --debug --rcfile 
/tmp/syslog-with-leading-spaces.conf
init
cfline(*.aauth.noth.notice;authpriv.none       /dev/console)
syslogd: unknown priority name "aauth.noth.notice"
(logmsg): syslog.err (43), flags 4, from localhost, msg syslogd: unknown 
priority name "aauth.noth.notice"
Logging to CONSOLE /dev/console
cfline(*.iail.none.none;authpriv.none          /var/log/messages)
syslogd: unknown priority name "iail.none.none"
(logmsg): syslog.err (43), flags 4, from localhost, msg syslogd: unknown 
priority name "iail.none.none"
Logging to CONSOLE /dev/console
cfline(*.iail.none.none;authpriv.none          /dev/tty12)
syslogd: unknown priority name "iail.none.none"
(logmsg): syslog.err (43), flags 4, from localhost, msg syslogd: unknown 
priority name "iail.none.none"
Logging to CONSOLE /dev/console
cfline(aut.*                                   /var/log/secure)
syslogd: unknown facility name "aut"
(logmsg): syslog.err (43), flags 4, from localhost, msg syslogd: unknown 
facility name "aut"
Logging to CONSOLE /dev/console
cfline(mai                                     /var/log/maillog)
syslogd: unknown priority name ""
(logmsg): syslog.err (43), flags 4, from localhost, msg syslogd: unknown 
priority name ""
Logging to CONSOLE /dev/console
cannot open 
/gnu/store/9i6q97ixp1ndrwq06b8b5y7mdy0ii4lz-inetutils-1.9.2/etc/syslog.d
 X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
UNUSED: 
 X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
UNUSED: 
 X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
UNUSED: 
 X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
UNUSED: 
 X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
UNUSED: 
(logmsg): syslog.info (46), flags 4, from localhost, msg syslogd (GNU inetutils 
1.9.2): restart
syslogd: restarted
Klog open /proc/kmsg
Opened UNIX socket `/dev/log'.
off & running....
Debugging is disabled. Send SIGUSR1 to PID=354 to turn on debugging.
--8<---------------cut here---------------end--------------->8---


And here is the output when the same conf file but without leading
spaces is used:
--8<---------------cut here---------------start------------->8---
# /run/current-system/profile/libexec/syslogd --debug --rcfile 
/tmp/syslog-without-leading-spaces.conf
init
cfline(*.alert;auth.notice;authpriv.none       /dev/console)
cfline(*.info;mail.none;authpriv.none          /var/log/messages)
cfline(*.info;mail.none;authpriv.none          /dev/tty12)
cfline(authpriv.*                              /var/log/secure)
cfline(mail.*                                  /var/log/maillog)
cannot open 
/gnu/store/9i6q97ixp1ndrwq06b8b5y7mdy0ii4lz-inetutils-1.9.2/etc/syslog.d
 X  X ff  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
FILE: /var/log/maillog
 X  X  X  X  X  X  X  X  X  X ff  X  X  X  X  X  X  X  X  X  X  X  X  X  X 
FILE: /var/log/secure
7f 7f  X 7f 7f 7f 7f 7f 7f 7f  X 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f TTY: 
/dev/tty12
7f 7f  X 7f 7f 7f 7f 7f 7f 7f  X 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 
FILE: /var/log/messages
 3  3  3  3 3f  3  3  3  3  3  X  3  3  3  3  3  3  3  3  3  3  3  3  3  3 
CONSOLE: /dev/console
(logmsg): syslog.info (46), flags 4, from localhost, msg syslogd (GNU inetutils 
1.9.2): restart
Logging to TTY /dev/tty12
Logging to FILE /var/log/messages
syslogd: restarted
Klog open /proc/kmsg
Opened UNIX socket `/dev/log'.
off & running....
Debugging is disabled. Send SIGUSR1 to PID=355 to turn on debugging.
--8<---------------cut here---------------end--------------->8---

>> Also I think it would be good to allow a user to specify his own
>> configuration file for syslogd (a patch is also attached²).  WDYT?
>
>> From f66520181a65566b1f191583c3e1344c1af93ecc Mon Sep 17 00:00:00 2001
>> From: Alex Kost <address@hidden>
>> Date: Sat, 28 Mar 2015 15:42:23 +0300
>> Subject: [PATCH 2/2] services: syslog-service: Add 'config-file' argument.
>>
>> * gnu/services/base.scm (syslog-service): Add 'config-file' keyword
>> argument.
>> * doc/guix.texi (Base Services): Document it.
>
> Sure, please push!

Thanks!

-- 
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]