Help Center/
Object Storage Service/
SDK Reference/
Node.js/
Initialization (SDK for Node.js)/
Configuring SDK Logging (SDK for Node.js)
Updated on 2024-11-13 GMT+08:00
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.
Parent topic: Initialization (SDK for Node.js)
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot