Re: Pipe into logger duplicates messages in /var/log/messages

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



On Tue, Mar 4, 2014 at 4:59 AM, John Doe <jdmls@xxxxxxxxx> wrote:

> From: Alexander <thahartner@xxxxxxxxx>
>
> > However the following command :
> > echo "HI" > logger -t test
> > Resulted in the message appearing twice in /var/log/messages on my
> CentOS 6
> > system.
>

I don't get duplicates on a CentOS 6 x86_64 VM of mine.

Either one example (below) will suffice ... obviously eliminating the pipe
is probably best.
logger "blah" -t test
echo "hi" | logger -t test

And it doesn't matter which user I'm logged in as (privileged or
non-privileged, it logs things just the same).

Unless of course you wanted to log the contents of a file, then pipe it!
~]# cat /tmp/blah
test one
test two
test three
test four

~]# cat /tmp/blah | logger -t test

~]# tail -f /var/log/messages


> Tested on CentOS 5.10 32bits/64bits and 6.5 64bits and I only get one
> appearance...
> Did you modify /etc/syslog.conf ?
> Maybe there are two entries repeating the same facility?
>

The OP is using CentOS 6 which has replaced sysklogd with rsyslog.


>
> JD
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
---~~.~~---
Mike
//  SilverTip257  //
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux