7

Most of the applications and services log to filesystem. Why don't they use syslog? Is it slow or unreliable?

What are the real pros and cons of using syslog?

weekens
  • 8,064
  • 6
  • 45
  • 62

1 Answers1

7

Cons

  • limited number of categories (e.g., when compared to log4j), which limits filtering capabilities
  • system-wide, requires administrator privileges to set up
  • not available on all OS-s (e.g., Windows)

Pros

  • application logging is plug-and-play, with well-known locations
  • single place to filter all messages
  • factors a lot of common functionality (such as writing to a file, sending logs remotely, rotating log files)
  • tools can be build (and actually exist) which can look at the logs of all applications at once
user1202136
  • 11,171
  • 4
  • 41
  • 62
  • 2
    Thanks for your answer! I also measured the logging performance. So, to the cons I can add that logging to syslog is almost twice slower, than to the ordinary text file. – weekens Apr 17 '12 at 09:23
  • Would you mind posting the results of your performance test? I am facing a similar issue and am curious to know the numbers. Thanks! – user2977636 Mar 09 '17 at 17:23
  • 1
    I'd also list under cons that multiline logging formats that some apps use get easily bloated and confused if the underlying syslog agent isn't configured to deal with it. E.g. Imagine a java stack trace where every line is treated as a separate event by syslog and has a syslog header in front of it. – JPvRiel Jun 27 '18 at 16:45