Class: MyLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/mylogger.rb

Overview

Class For Log to /var/log/system.log

Examples:

MyLogger.ln("message")
MyLogger.lw("message")

Author:

Constant Summary collapse

Version =
"0.0.1"

Class Method Summary collapse

Class Method Details

.ln(message) ⇒ Object

log notice

Parameters:

  • message (String)

    message for log



13
14
15
16
17
# File 'lib/lib/mylogger.rb', line 13

def self.ln(message)
  self.before
  Syslog.log(Syslog::LOG_NOTICE, "%s", message)
  self.after
end

.lw(message) ⇒ Object

log warning

Parameters:

  • message (String)

    message for log



21
22
23
24
25
# File 'lib/lib/mylogger.rb', line 21

def self.lw(message)
  self.before
  Syslog.log(Syslog::LOG_WARNING, "%s", message)
  self.after
end