You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
TOS log collection
Collect TOS logs
Copy page
Download PDF
Collect TOS logs
This topic introduces TOS log analysis features, usage limits, and so on.​
Features overview​
Torch Object Storage (TOS) provides TOS log analysis, enabling real-time recording of TOS resource access based on TLS fundamental capabilities. It supports scenarios such as cloud resource operation auditing, popularity statistics, troubleshooting for exceptions, and event tracing.​
The TOS log analysis feature records real-time access information for all resources in TOS, including details like user account, bucket name, operation type, and source IP address for each request. After enabling access log, logs are stored in a specific log topic in TLS. You can use query and analysis features to retrieve logs in real time or perform SQL analysis, track the trends of access events, and build dashboards or configure monitoring alerts based on SQL statements.​
Relevant configurations for TOS log analysis are as follows:​
​
Configuration​
Description​
Log type​
Logs that TOS access.​
Log storage location​
After enabling the TOS log analysis feature, TLS will create a dedicated TOS log project and log topic in the current region. For details, see Manage TOS log resources.​
  • Dedicated log project: tos-log-<accountID>-<region name>​
  • Dedicated topic: tos-log-topic​
Log retention period​
By deault, it is seven days. Logs will be automatically deleted after expiration. You can also modify the log retention period based on your business needs.​
Log shards​
Two shards are preset. Auto split is enabled by default. When write traffic is high, TLS will automatically split shards to meet data write requirements.​
Index settings​
Indexes have been configured for all fields.​
Log fields​
For a detailed list of log fields, see TOS log field.​
​
Collect TOS logs​
  • Billing description​
  • After enabling the TOS log analysis feature, costs will be incurred for log storage, index storage, write traffic, index traffic, number of service requests, number of log shards, and other related costs. If you perform operations such as data transformation, log shipping, or log consumption on the dedicated TOS log topic, costs will be incurred for internal network read traffic, public network read traffic, data transformation traffic, log shipping traffic, and other related costs. Costs are charged separately by TLS. For details, please refer to Billing overview.​
  • Limits​
  • The exclusive log topics for TOS log analysis are only used to store logs related to storage functions. Actions that involve resource changes, such as writing other data, modifying index configurations, or deleting log topics, are not supported. There are no special restrictions for query and analysis, log dumping, log consumption, dashboard, and monitoring and alert features.​
  • Steps for collecting TOS logs​
  • You can enable the log analysis feature for existing or newly created buckets. For details, refer to Log analysis.​
Description​
For example, to enable log analysis when creating a bucket:​
  1. Log in to the Object Storage Console, and click Bucket List in the left navigation bar.​
  1. In the upper left of the page, click Create Bucket, expand Advanced Settings, turn on the Log Analysis switch, and click OK.​
TOS log field​
Each bucket access request is recorded as an access log entry. The detailed log fields are as follows:​
​
Name​
Description​
LogType​
The log type for TOS is tos_access_log.​
Time​
The time when TOS received the request.​
RequestId​
The request ID.​
Bucket​
The name of the TOS bucket.​
Object​
The key of the requested object.​
ObjectSize​
The size of the requested object. Unit: bytes.​
VersionId​
The version ID of the requested object.​
Operation​
The type of the action.​
RemoteIp​
The source IP address of the request.​
BucketLocation​
Region where the TOS bucket is located.​
StorageClass​
Storage class of the TOS bucket. The possible values are as follows:​
  • STANDARD: Standard storage.​
  • IA: Infrequent access storage.​
  • ARCHIVE_FR: Archive flash restore storage.​
  • ARCHIVE: Archive storage.​
  • COLD_ARCHIVE: Cold archive storage.​
  • DEEP_COLD_ARCHIVE: Deep cold archive storage.​
Host​
The domain name accessed by the request.​
HTTPMethod​
The HTTP request method.​
HTTPStatus​
The HTTP status code returned for the request.​
HTTPSchema​
The protocol of the HTTP request, including HTTP and HTTPS.​
RequestSize​
The value of Content-Length in request header, measured in bytes.​
ResponseSize​
The value of Content-Length in response header, measured in bytes.​
DeltaDataSize​
Change in storage size (bytes) caused by the request, as follows:​
  • Positive value: indicates that the request increases the storage size. Uploading an object increases the storage size.​
  • Negative value: indicates that the request decreases the storage size. Permanently deleting an object decreases the storage size.​
HistoricalVersionDeltaSize​
Description of changes in the storage size of historical version objects (Bytes) is as follows:​
  • Positive value: Indicates that this request increases the storage size of historical version objects. When versioning is enabled, uploading an object to overwrite an existing object or adding a delete marker to an object will increase the storage size of historical version objects.​
  • Negative value: Indicates that this request decreases the storage size of historical version objects. In scenarios where there is no latest version object, deleting the delete marker of an object or permanently deleting a historical object will decrease the storage size of historical version objects.​
RequestUri​
The URI of the HTTP request, including query-string.​
CostTime​
The time it takes the TOS server to process the request, measured in milliseconds.​
UserAgent​
The HTTP User-Agent header.​
Referer​
The HTTP Referer of the request.​
OwnerId​
The account ID of the bucket owner.​
RequesterId​
The account ID of the requester. If it is anonymous access, this is displayed as a hyphen (-).​
AccessKeyId​
The AccessKey ID of the requester.​
RequesterUserName​
The username of the requester.​
RequestSourceType​
The type of synchronous request. The details are as follows:​
  • Hyphen (-): Regular request.​
  • cdn: Origin fetch.​
  • crr-sync: Cross-region replication request.​
  • lifecycle: Lifecycle rule.​
  • accelerate: Transfer acceleration.​
ErrorCode​
The error code returned by TOS.​
ReservedFiled​
Reserved field, displayed as -.​
MirrorSourceStatus​
The status code returned by the origin server in back-to-origin scenarios.​
ECCode​
The EC error code.​
RespTime​
Response time, that is, the time from receiving the request to responding with the first byte, in milliseconds.​
TrashPath​
The storage path of deleted objects in the recycle bin when the recycle bin feature is enabled for an HNS bucket.​
MRAPAlias​
Alias of the multi-region access point.​
MRAPDstEndpoint​
When accessing TOS via a multi-region access point and the source bucket object does not exist, the bucket domain name of the target storage bucket for origin fetch.​
MRAPDstRegion​
When accessing TOS via a multi-region access point and the source bucket object does not exist, the region of the target storage bucket for origin fetch.​
MRAPDstBucket​
When accessing TOS via a multi-region access point and the source bucket object does not exist, the name of the target storage bucket for origin fetch.​
MRAPSrcRegion​
When accessing TOS via a multi-region access point, the source region to which the request is routed.​
MRAPSrcBucket​
When accessing TOS via a multi-region access point, the source bucket to which the request is routed.​
StorageTier​
The tier of the object in intelligent tiering. Possible values are as follows:​
  • FREQUENT: Frequent access tier in intelligent tiering.​
  • INFREQUENT: Infrequent access tier in intelligent tiering.​
  • ARCHIVEFR: Intelligent tiered archive Flashback Access Tier.​
Payer​
The paying party for the request. The possible values are as follows:​
  • BucketOwner: The bucket owner pays.​
  • Requester: The requester pays.​
TargetStorageClass​
The storage class of the target object. This field is returned only when the Operation field is TransferObject or CopyObject, as described below:​
  • If the Operation field is TransferObject, the TargetStorageClass field indicates the storage class of the object after it is converted using lifecycle rules.​
  • If the Operation field is CopyObject, the TargetStorageClass field indicates the storage class of the new object when copying the object.​
​
​
Last updated: 2026.02.05 15:31:15