Class: Groonga::FileLogger

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

Instance Method Summary collapse

Methods inherited from Logger

#log

Constructor Details

#initialize(file_name) ⇒ FileLogger

Returns a new instance of FileLogger.



84
85
86
87
88
# File 'lib/groonga/logger.rb', line 84

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

Instance Method Details

#finObject



98
99
100
101
102
103
# File 'lib/groonga/logger.rb', line 98

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

#reopenObject



90
91
92
93
94
95
96
# File 'lib/groonga/logger.rb', line 90

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