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.
106 107 108 109 |
# File 'lib/groonga/query-logger.rb', line 106 def initialize(callback) super() @callback = callback end |
Instance Method Details
#fin ⇒ Object
123 124 125 126 127 |
# File 'lib/groonga/query-logger.rb', line 123 def fin guard do @callback.call(:fin) end end |
#log(flag, timestamp, info, message) ⇒ Object
111 112 113 114 115 |
# File 'lib/groonga/query-logger.rb', line 111 def log(flag, , info, ) guard do @callback.call(:log, flag, , info, ) end end |
#reopen ⇒ Object
117 118 119 120 121 |
# File 'lib/groonga/query-logger.rb', line 117 def reopen guard do @callback.call(:reopen) end end |