1

What exactly is the difference between using logger and syslog -s? According to its manpage, logger provides interface to the system log module, but I can't really see the point given that syslog(1) seems to be just that, only much more powerful.

Is it just a matter of simplicity or am I missing something? And which one would you recommend for simple scripting?

0

syslog is more powerful than logger which also means that logger is easier to use for simple purposes. The man page indicates as much:

man logger -> Logger provides a shell command interface to the syslog(3) system log module

The main advantage of syslog -s for simple logging is sending log lines to a different computer to have it logged there. For simple shell scripting that's probably not needed.

| improve this answer | |
  • Thanks for the clarification! Seems like it's more or less what I expected. However, as you can notice, the manpage you're citing mentions syslog(3) (the system log module), rather than syslog(1) (the command). In fact, syslog(1) isn't referred to at all in the whole logger manpage, even though it seems to provide "a shell command interface to the syslog(3) system log module" just as well. I found it a bit confusing and hence my question! – u.n.owen Sep 22 '12 at 22:13
  • (1) and (3) are chapter numbers in the man pages. 1 is commands, 3 is library calls. The facility itself is just syslog. – nohillside Sep 22 '12 at 22:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .