Search code examples
unixloggingsyslog

Logging to syslog vs filesystem: pros and cons


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?


Solution

  • 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