Skip to content

Commit

Permalink
Never close old logger
Browse files Browse the repository at this point in the history
There's not a great way to handle automatically closing old file
descriptors, so I'm just going to leave it out for now.
  • Loading branch information
quixoten committed Aug 27, 2014
1 parent dc9647b commit a8e071c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/protobuf/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ module Logging
def self.initialize_logger(log_target=$stdout, log_level=::Logger::INFO)
@counter ||= 0
@counter = @counter + 1
old_logger = defined?(@logger) ? @logger : nil
@logger = Logger.new(log_target)
@logger.level = log_level
old_logger.close if old_logger and log_target != $stdout
@logger
end

Expand Down

0 comments on commit a8e071c

Please sign in to comment.