Class: Syslog::Logger::Facilitated

Inherits:
Syslog::Logger show all
Defined in:
lib/syslog/logger/facilitated/version.rb,
lib/syslog/logger/facilitated.rb

Overview

Syslog::Logger patched to support #<< and setting facility. Drop-in replacement.

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Constructor Details

#initialize(program_name = 'ruby', facility = Syslog::LOG_USER) ⇒ Facilitated

Returns a new instance of Facilitated.



8
9
10
11
12
13
14
# File 'lib/syslog/logger/facilitated.rb', line 8

def initialize program_name = 'ruby', facility = Syslog::LOG_USER
  @level = ::Logger::DEBUG
  @formatter = Formatter.new

  Syslog::Logger.syslog =
      Syslog.open(program_name, Syslog::LOG_ODELAY | Syslog::LOG_CONS, facility)
end