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 the API Reference.
OBS Node.js SDK provides the logging function based on Log4js. You can call ObsClient.initLog to enable and configure logging. Sample code is as follows:
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot