Class: Groonga::CallbackLogger
Instance Method Summary collapse
- #fin ⇒ Object
-
#initialize(callback) ⇒ CallbackLogger
constructor
A new instance of CallbackLogger.
- #log(level, timestamp, title, message, location) ⇒ Object
- #reopen ⇒ Object
Constructor Details
#initialize(callback) ⇒ CallbackLogger
Returns a new instance of CallbackLogger.
119 120 121 122 |
# File 'lib/groonga/logger.rb', line 119 def initialize(callback) super() @callback = callback end |
Instance Method Details
#fin ⇒ Object
136 137 138 139 140 |
# File 'lib/groonga/logger.rb', line 136 def fin guard do @callback.call(:fin) end end |
#log(level, timestamp, title, message, location) ⇒ Object
124 125 126 127 128 |
# File 'lib/groonga/logger.rb', line 124 def log(level, , title, , location) guard do @callback.call(:log, level, , title, , location) end end |
#reopen ⇒ Object
130 131 132 133 134 |
# File 'lib/groonga/logger.rb', line 130 def reopen guard do @callback.call(:reopen) end end |