Class: Groonga::FileQueryLogger

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

Instance Method Summary collapse

Methods inherited from QueryLogger

#log

Constructor Details

#initialize(file_name) ⇒ FileQueryLogger

Returns a new instance of FileQueryLogger.



71
72
73
74
75
# File 'lib/groonga/query-logger.rb', line 71

def initialize(file_name)
  super()
  @file = nil
  @file_name = file_name
end

Instance Method Details

#finObject



85
86
87
88
89
90
# File 'lib/groonga/query-logger.rb', line 85

def fin
  guard do
    return unless @file
    @file.close
  end
end

#reopenObject



77
78
79
80
81
82
83
# File 'lib/groonga/query-logger.rb', line 77

def reopen
  guard do
    return unless @file
    @file.close
    @file = nil
  end
end