Logs
Logs APIs enables SwiftFederaton partners or customers to list and download log files.
Note 1: Log files will be kept for a period of 40 days.
Note 2: The maximum number of connections for log download is 2 and the maximum number of concurrent requests is 10 requests/second.
Note 3: The maximum log file delay is 48 hours.
Logs APIs includes:
- List Log Files
Changes:
- Log Archive Rule Changes:
In order to improve the user experience, we will change log archive rule since 2022 Sep 1st.
Upgrade Start Time
2022-09-01 00:00 +08:00
Upgrade End Time
2022-09-01 01:00 +08:00Old log archive rule: packaged log file base on log processing timestamp, the log file granularity is 5 minutes.
New log archive rule: packaged log file base on access request timestamp, the log file granularity is 1 hour.
Archive log file naming Example:
The old archive log file naming rule: {processing timestamp}-{serial_num}.log.gz
e.g. 20220801010500-21.log.gz contains the log lines which was processing from 2022/08/01 01:05:00 to 2022/08/01 01:10:00, considering the log processing delay, some of the log line in the archive file comes from CDN access request before 2022/08/01 01:05:00The new archive log file naming rule: {access request timestamp}-{serial_num}.log.gz
e.g. 20220901010000-21.log.gz only contains the log lines which is access request from 2022/09/01 01:00:00 to 2022/09/01 02:00:00
API compatibility:
the API List Log Files will still work after the archive rule enhancement, but there are two things should be noted:
- When use API to get the old archive rule log files, the delay of get all log files is small, since the delay log will be in another later startTime/endTime time span API response result.
when change to new archive rule for log files, the caller must call the API with several times to make sure to download all log files, because, delayed log files might be emerged to the system from time to time when the network is congested. But, the hard limit is any access log delayed more than 48 hours will be discarded by the system. So, in practise, for billing purpose, the caller can consider the log files is finalised after 48 hours.- The old API accept startTime/endTime params in 5 minutes granularity, but new API accept only 1 hour granularity, which means should call the API with startTime/endTime by hour like 2022-09-01T08:00:00Z, if use startTime/endTime like 2022-09-01T08:05:00Z the API may not return any log file.