Module: Aliyun::OSS::Logging

Included in:
Client, HTTP, Multipart::Transaction, Protocol, ServerError, Util
Defined in:
lib/aliyun/oss/logging.rb

Overview

Logging support

Examples:

include Logging
logger.info(xxx)

Constant Summary collapse

DEFAULT_LOG_FILE =
"./oss_sdk.log"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.set_log_file(file) ⇒ Object

设置日志输出的文件



22
23
24
# File 'lib/aliyun/oss/logging.rb', line 22

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

.set_log_level(level) ⇒ Object

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



17
18
19
# File 'lib/aliyun/oss/logging.rb', line 17

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

Instance Method Details

#loggerObject

获取logger



27
28
29
# File 'lib/aliyun/oss/logging.rb', line 27

def logger
  Logging.logger
end