Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 842
weekens Avatar asked Apr 16 '12 13:04

weekens


1 Answers

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
like image 180
user1202136 Avatar answered Sep 22 '22 12:09

user1202136