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.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/byteback/log.rb b/lib/byteback/log.rb
index 6753ca8..83679e6 100644
--- a/lib/byteback/log.rb
+++ b/lib/byteback/log.rb
@@ -2,7 +2,6 @@ require 'logger'
require 'syslog'
module Byteback
-
#
# Translates Ruby's Logger calls to similar calls to Syslog
# (implemented in Ruby 2.0 as Syslog::Logger).
@@ -18,15 +17,15 @@ 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
-
+
#
# syslog(3) says:
#
@@ -52,7 +51,6 @@ module Byteback
module Log
@@me = File.expand_path($PROGRAM_NAME).split('/').last
-
#
# If we're running interactively then we have simple logging.
#
@@ -80,24 +78,23 @@ module Byteback
@@logger = SyslogProxy
end
-
def debug(*a)
@@logger.__send__(:debug, *a)
end
-
+
def info(*a)
@@logger.__send__(:info, *a)
end
-
+
def warn(*a)
@@logger.__send__(:warn, *a)
end
-
+
def fatal(*a)
@@logger.__send__(:fatal, *a)
exit 1
end
-
+
def error(*a)
@@logger.__send__(:error, *a)
end