Class: Groonga::CallbackQueryLogger

Inherits:
QueryLogger show all
Defined in:
lib/groonga/query-logger.rb

Instance Method Summary collapse

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

#finObject



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, timestamp, info, message)
  guard do
    @callback.call(:log, flag, timestamp, info, message)
  end
end

#reopenObject



117
118
119
120
121
# File 'lib/groonga/query-logger.rb', line 117

def reopen
  guard do
    @callback.call(:reopen)
  end
end