Class: Groonga::FileLogger
Instance Method Summary collapse
-
#fin ⇒ Object
-
#initialize(file_name) ⇒ FileLogger
constructor
A new instance of FileLogger.
-
#reopen ⇒ Object
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
#fin ⇒ Object
125 126 127 128 129 130 |
# File 'lib/groonga/logger.rb', line 125 def fin guard do return unless @file @file.close end end |
#reopen ⇒ Object
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 |