SDK Logging
Updated at:2025-11-03
SDK logging
The BOS Ruby SDK supports four levels of logging (the default level is Logger::INFO) and allows setting the directory for outputting log files. For details, please refer to the Log module. Example code:
Ruby
1# Default log path: DEFAULT_LOG_FILE = "./baidubce-sdk.log"
2Log.set_log_file(file_path)
3# Four log levels: Logger::DEBUG | Logger::INFO | Logger::ERROR | Logger::FATAL
4Log.set_log_level(Logger::DEBUG)
