Class: Groonga::CallbackQueryLogger
- Inherits:
-
QueryLogger
- Object
- QueryLogger
- Groonga::CallbackQueryLogger
- Defined in:
- lib/groonga/query-logger.rb
Instance Method Summary collapse
-
#fin ⇒ Object
-
#initialize(callback) ⇒ CallbackQueryLogger
constructor
A new instance of CallbackQueryLogger.
-
#log(flag, timestamp, info, message) ⇒ Object
-
#reopen ⇒ Object
Constructor Details
#initialize(callback) ⇒ CallbackQueryLogger
Returns a new instance of CallbackQueryLogger.
151 152 153 154 |
# File 'lib/groonga/query-logger.rb', line 151 def initialize(callback) super() @callback = callback end |
Instance Method Details
#fin ⇒ Object
168 169 170 171 172 |
# File 'lib/groonga/query-logger.rb', line 168 def fin guard do @callback.call(:fin) end end |
#log(flag, timestamp, info, message) ⇒ Object
156 157 158 159 160 |
# File 'lib/groonga/query-logger.rb', line 156 def log(flag, , info, ) guard do @callback.call(:log, flag, , info, ) end end |
#reopen ⇒ Object
162 163 164 165 166 |
# File 'lib/groonga/query-logger.rb', line 162 def reopen guard do @callback.call(:reopen) end end |