lib/timber/config.rb in timber-2.3.2 vs lib/timber/config.rb in timber-2.3.3
- old
+ new
@@ -75,15 +75,11 @@
# @example Rails
# config.timber.debug_to_file!("#{Rails.root}/log/timber.log")
# @example Everything else
# Timber::Config.instance.debug_to_file!("log/timber.log")
def debug_to_file!(file_path)
- unless File.exist? File.dirname path
- FileUtils.mkdir_p File.dirname path
- end
- file = File.open file_path, "a"
- file.binmode
- file.sync = config.autoflush_log
+ FileUtils.mkdir_p( File.dirname(file_path) )
+ file = File.open(file_path, "ab")
file_logger = ::Logger.new(file)
file_logger.formatter = SimpleLogFormatter.new
self.debug_logger = file_logger
end
\ No newline at end of file