----- Original Message -----
> From: "Jeffrey Bastian" <jbast...@redhat.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Thursday, 9 July, 2015 4:37:00 PM
> Subject: Re: [LTP] [PATCH] syslog/syslog-lib.sh: support systemd journal
>
> On Thu, Jul 09, 2015 at 09:39:54AM -0400, Jan Stancek wrote:
> > Do the testcases pass for you with this patch? They still fail for me with
> > rsyslog-7.4.7-7.el7_0 and systemd-219-5.el7.
> ...
> > which fails for me unless I add "$WorkDirectory" option.
>
> Hmm, it worked in my tests last night, but it's failing today. You're
> right, the $WorkDirectory option fixed it. Fortunately that's just a
> minor tweak to the regex in the patch; see attached for a new version of
> the patch.
>
> ::::::::::::
> :: Before ::
> ::::::::::::
> [root@localhost bin]# grep -i journal syslog-lib.sh
> [root@localhost bin]# syslog01 ; echo $?
> syslog01 0 TINFO : Send messages to syslogd at some level
> syslog01 0 TINFO : and facility and grep for those messages.
> syslog01 0 TINFO : testing whether messages are logged into log file
> syslog01 0 TINFO : restarting syslog daemon
> syslog01 0 TINFO : restarting syslog daemon
> 1
>
> :::::::::::
> :: After ::
> :::::::::::
> [root@localhost bin]# grep -i journal syslog-lib.sh
> systemd_journal=$(grep -Ehoi
> "^[^#].*(imjournal|workdirectory).*" -r /etc/rsyslog.conf
> /etc/rsyslog.d/)
> $systemd_journal
> [root@localhost bin]# syslog01 ; echo $?
> syslog01 0 TINFO : Send messages to syslogd at some level
> syslog01 0 TINFO : and facility and grep for those messages.
> syslog01 0 TINFO : testing whether messages are logged into log file
> syslog01 0 TINFO : restarting syslog daemon
> syslog01 0 TINFO : restarting syslog daemon
> 0
>
>
>
> > > I think it's ok to leave both modules enabled, though. The default
> > > rsyslog.conf in Fedora (up to F21) had both enabled:
> >
> > It seems to duplicate messages for me in quite unpredictable way.
> > After running syslog02:
>
> With the updated patch, it looks ok for me:
>
> [root@localhost bin]# systemctl stop rsyslog
> [root@localhost bin]# cat /dev/null >/var/log/maillog
> [root@localhost bin]# systemctl start rsyslog
> [root@localhost bin]# syslog02
> ...
> root@localhost bin]# cat /var/log/maillog
> 2015-07-09T10:32:10.383470-04:00 localhost syslogtst: syslogtst: mail emerg
> test.
> 2015-07-09T10:32:14.403420-04:00 localhost syslogtst: syslogtst: mail alert
> test.
> 2015-07-09T10:32:18.422884-04:00 localhost syslogtst: syslogtst: mail crit
> test.
> 2015-07-09T10:32:22.442509-04:00 localhost syslogtst: syslogtst: mail err
> test.
> 2015-07-09T10:32:26.461447-04:00 localhost syslogtst: syslogtst: mail warning
> test.
> 2015-07-09T10:32:30.480587-04:00 localhost syslogtst: syslogtst: mail notice
> test.
> 2015-07-09T10:32:34.499815-04:00 localhost syslogtst: syslogtst: mail info
> test.
> 2015-07-09T10:32:38.518913-04:00 localhost syslogtst: syslogtst: mail debug
> test.
Presumably because you are running new systemd. Can you try with
"ForwardToSyslog=yes" set in journald.conf (which is the case for old systemd)?
That still gives me duplicated messages with v2 of the patch.
Regards,
Jan
>
> --
> Jeff Bastian
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list