summaryrefslogtreecommitdiff
path: root/lib/byteback/log.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/byteback/log.rb')
-rw-r--r--lib/byteback/log.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/byteback/log.rb b/lib/byteback/log.rb
index 86564e4..cfd3feb 100644
--- a/lib/byteback/log.rb
+++ b/lib/byteback/log.rb
@@ -13,7 +13,16 @@ module Byteback
def info(m); log_nopc(Syslog::LOG_INFO, m); end
def warn(m); log_nopc(Syslog::LOG_WARNING, m); end
def error(m); log_nopc(Syslog::LOG_ERR, m); end
- def fatal(m); log_nopc(Syslog::LOG_EMERG, m); end
+ #
+ # syslog(3) says:
+ #
+ # LOG_EMERG means "system is unusable"
+ # LOG_ERR means "error conditions"
+ #
+ # Errors might be fatal to Byteback, but they're unlikely to make the
+ # whole server unusable. So lets dial this down to ERR from EMERG.
+ #
+ def fatal(m); log_nopc(Syslog::LOG_ERR, m); end
def log_nopc(level, m)
Syslog.log(level, m.gsub("%","%%"))