Updated on 2026-09-22 GMT+08:00

Configuring SDK Logging

If you have any questions during development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see API Reference.

OBS PHP SDK provides the logging function based on the monolog log library. The logging function is disabled by default. You can call ObsClient->initLog to enable and configure logging. Sample code is as follows:

$obsClient->initLog([
       'FilePath' => './logs', // Set the log folder.
       'FileName' => 'eSDK-OBS-PHP.log', // Set the name for the log file.
       'MaxFiles' => 10, // Set the maximum number of log files that can be retained.
       'Level' => WARN  // Set the log level.
]);

For more information about SDK logging, see Log Analysis.