diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2015-01-29 09:46:19 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2015-01-29 09:46:19 +0000 |
commit | e74d1b49c5d14c57a2704f353f705cbfce4d37f3 (patch) | |
tree | ceb4f012e71df55eab0e8f5950dd4655c542ecbc | |
parent | 55dbe2efd200cf0b36f250d45127ef0f1ce2067d (diff) |
Dial back fatal logging from CRIT to ERR
-rw-r--r-- | lib/byteback/log.rb | 11 |
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("%","%%")) |