Class: Logging::Appenders::Oml4r

Inherits:
Logging::Appender
  • Object
show all
Defined in:
lib/oml4r/logging/oml4r_appender.rb

Defined Under Namespace

Classes: LogMP

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Oml4r

pass a name and the usual OML options here to configure oml4r



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/oml4r/logging/oml4r_appender.rb', line 26

def initialize *args
  opts = Hash === args.last ? args.pop : {}
  name = args.empty? ? 'oml4r' : args.shift
  super(name, opts)
  begin
    OML4R::init(nil, opts)
  rescue OML4R::MissingArgumentException => mex
    $stderr.puts mex
    exit
  end
  @inject_failed = false
end

Instance Method Details

#close(*args) ⇒ Object



39
40
41
42
# File 'lib/oml4r/logging/oml4r_appender.rb', line 39

def close *args
  super(false)
  OML4R::close()
end