Module: Alipan::Common::Logging

Included in:
HTTP, Protocol
Defined in:
lib/alipan/common/logging.rb

Constant Summary collapse

MAX_NUM_LOG =
100
ROTATE_SIZE =
10 * 1024 * 1024

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.set_log_file(file) ⇒ Object



17
18
19
# File 'lib/alipan/common/logging.rb', line 17

def self.set_log_file(file)
  @log_file = file
end

.set_log_level(level) ⇒ Object

level = Logger::DEBUG | Logger::INFO | Logger::ERROR | Logger::FATAL



13
14
15
# File 'lib/alipan/common/logging.rb', line 13

def self.set_log_level(level)
  Logging.logger.level = level
end

Instance Method Details

#loggerObject



21
22
23
# File 'lib/alipan/common/logging.rb', line 21

def logger
  Logging.logger
end