On 28-02-16 16:35, Per Jessen wrote:
Billy.Zheng(zw963) wrote:
From logger command man:
logger - a shell command interface to the syslog(3) system log module So, I want to use this command to write log to syslog.
following is a test:
$: echo 'some special log output' |logger
but, i could not found anything about my log in /var/log/.
From the man page:
logger [options] [message]
For your test to work:
$: echo 'some special log output' | xargs logger
Could you explain why this xargs is needed? (because it seems to work without it, on my system....) opensuse:~ # echo 'TEST1' | logger opensuse:~ # echo 'TEST2' | xargs logger opensuse:~ # tail -2 /var/log/messages 2016-02-28T17:14:22.807347+01:00 opensuse luuk: TEST1 2016-02-28T17:14:33.648455+01:00 opensuse luuk: TEST2 opensuse:~ # -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org