Skip to content

Commit

Permalink
Merge 88a6aa7 into 794fc45
Browse files Browse the repository at this point in the history
  • Loading branch information
Lithium committed Sep 26, 2017
2 parents 794fc45 + 88a6aa7 commit 854e06e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions lib/aliyun/common/logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ def self.set_log_file(file)
def logger
Logging.logger
end

private

def self.logger
unless @logger
@logger = Logger.new(
@log_file ||= DEFAULT_LOG_FILE, MAX_NUM_LOG, ROTATE_SIZE)
@logger.level = Logger::INFO

class << self
private

def logger
unless @logger
@logger = Logger.new(
@log_file ||= DEFAULT_LOG_FILE, MAX_NUM_LOG, ROTATE_SIZE)
@logger.level = Logger::INFO
end
@logger
end
@logger
end

end # logging
end # Common
end # Aliyun

0 comments on commit 854e06e

Please sign in to comment.