Module: Aliyun::Common::Logging
- Included in:
- OSS::Callback, OSS::HTTP, OSS::Multipart::Download, OSS::Multipart::Upload, OSS::Protocol, OSS::Util, STS::Protocol, STS::Util
- Defined in:
- lib/aliyun/common/logging.rb
Overview
Logging support
Constant Summary collapse
- MAX_NUM_LOG =
100
- ROTATE_SIZE =
10 * 1024 * 1024
Class Method Summary collapse
-
.set_log_file(file) ⇒ Object
设置日志输出的文件.
-
.set_log_level(level) ⇒ Object
level = Logger::DEBUG | Logger::INFO | Logger::ERROR | Logger::FATAL.
Instance Method Summary collapse
-
#logger ⇒ Object
获取logger.
Class Method Details
.set_log_file(file) ⇒ Object
设置日志输出的文件
23 24 25 |
# File 'lib/aliyun/common/logging.rb', line 23 def self.set_log_file(file) @log_file = file end |
.set_log_level(level) ⇒ Object
level = Logger::DEBUG | Logger::INFO | Logger::ERROR | Logger::FATAL
18 19 20 |
# File 'lib/aliyun/common/logging.rb', line 18 def self.set_log_level(level) Logging.logger.level = level end |
Instance Method Details
#logger ⇒ Object
获取logger
28 29 30 |
# File 'lib/aliyun/common/logging.rb', line 28 def logger Logging.logger end |