- Documentation
Torch Object Storage
SDK Reference
Java
Log Configuration
Log Configuration (Java SDK)
Log Configuration
Log Configuration (Java SDK)
Log Configuration (Java SDK)
The TOS Java SDK provides a logging feature that allows you to view request-related information by enabling logging.
Log Description
The TOS Java SDK uses the slf4j logging framework and prints logs at the following locations.
- When calculating the request signature, print the canonical request log at the DEBUG log level.
- When calculating the request signature, print the string to sign log with a log level of DEBUG.
- When a request is successful, log the HTTP status code, requestId, total request duration, and other relevant information. The log level is INFO.
- When a client request fails (excluding cases where the server returns TosServerException), print the failure information with the log level set to INFO.
- When a request succeeds or fails, print the request chain timing information, including DNS resolution, connection establishment, sending/receiving requests, etc. The log level is set to DEBUG.
Method for Enabling Logging
The TOS Java SDK utilizes the slf4j logging framework. Users may bind and customize log4j, log4j2, JUL, or other logging frameworks according to specific business requirements.
Sample Log Content
An example of log content is provided below.
Last updated: 2025.09.22 11:34:15