Configuring SDK Logging (SDK for Node.js)
If you have any questions during development, post them on the Issues page of GitHub.
OBS Node.js SDK provides the logging function based on Log4js. You can call ObsClient.initLog to enable and configure logging. The following is a code sample:
obsClient.initLog({ file_full_path:'./logs/OBS-SDK.log', //Set the path to the log file. max_log_size:20480, //Set the size of the log file, in bytes. backups:10, //Set the maximum number of log files that can be stored. level:'warn', //Set the log level. log_to_console:true //Set whether to print the log to console. });
- The logging function is disabled by default. You need to enable it manually.
- For details about SDK logs, see Log Analysis.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.