• Object Storage Service

  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Android SDK)
  4. Initialization
  5. Configuring SDK Logging

Configuring SDK Logging

OBS Android SDK provides the logging function based on the java.util.logging library. You can use LogConfigurator.enableLog to enable or use LogConfigurator.disableLog to disable the logging function. Sample code is as follows:

// Set the log level. The default value is isLogConfigurator.WARN.
// Set the number of retained log files. The default value is 10.
// Set the log file size (in bytes). No size limit is set by default.
LogConfigurator.setLogFileSize(1024 * 1024 * 10); 
// Set the save directory of the log files. Logs are saved in logs directory of the SD card, by default. 
// Enable logging.
// Disable logging. 
  • The logging function is disabled by default. You need to enable it if needed.

  • For details about SDK logs, see 19.5 Log Analysis.

  • If no save directory of log files is configured, log files will be saved in the logs directory of the SD card, by default.