Class: Groonga::FileLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/groonga/logger.rb

Instance Method Summary collapse

Methods inherited from Logger

#log, log_path, log_path=, query_log_path, query_log_path=

Constructor Details

#initialize(file_name) ⇒ FileLogger

Returns a new instance of FileLogger.



111
112
113
114
115
# File 'lib/groonga/logger.rb', line 111

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

Instance Method Details

#finObject



125
126
127
128
129
130
# File 'lib/groonga/logger.rb', line 125

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

#reopenObject



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

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