- Documentation
Torch Object Storage
SDK Reference
C++
Log Configuration (C++ SDK)
C++
Log Configuration (C++ SDK)
Log Configuration (C++ SDK)
The logging feature of the C++ SDK can collect logs of various operations performed on TOS and store these logs locally as files.
Log Output Timing
For each API call, the SDK will print logs at the following locations:
- Before initiating the request, print the original signature values for this API call at the DEBUG level, including CanonicalRequest and StringToSign.
- At the DEBUG level, logs are printed detailing the HTTP connection information and the duration of each stage for the current API call, including Method, Host, Request URI, DNS resolution time, TCP connection time, TLS handshake time, data transmission time, and total HTTP request duration.
- After a request is made, the execution details are logged at the INFO level. If the request fails, failure information is recorded; upon completion of the request, the HTTP status code, RequestID, and total interface invocation time are logged.
Method for Enabling Logging
The following code demonstrates how to enable the logging functionality in the C++ SDK.
Additionally, the following statements must be added to the CMakelist file.
Sample Log Content
Last updated: 2025.09.25 14:22:45