Class: LoggoRails::Sync

Inherits:
Object
  • Object
show all
Includes:
MonitorMixin
Defined in:
lib/loggo_rails/sync.rb

Instance Method Summary collapse

Constructor Details

#initializeSync

Returns a new instance of Sync.



5
6
7
# File 'lib/loggo_rails/sync.rb', line 5

def initialize()
  mon_initialize
end

Instance Method Details

#write(msg) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/loggo_rails/sync.rb', line 9

def write(msg)
  synchronize do
    client.insert msg
  end
rescue Exception => ignored
  warn("log writing failed. #{ignored}")
end