Skip to content
Console

Access logs

Access logs record every request that reaches a bucket or CDN domain. You can use them to troubleshoot 403s and 404s and find where traffic comes from. Logs don't need to be enabled and aren't charged separately.

Entry point: Observability › Access logs (观测 › 访问日志), at https://console.bitiful.com/observe/logs.

View logs

Select a source

In the Select bucket / domain (请选择 桶 / 域名) drop-down, choose a bucket or a CDN domain. When you open the page, the first bucket is selected by default, or the first domain if you have no buckets. You can type in the drop-down to search.

Filter by status code

In the Status code (状态码) drop-down, choose 2XX, 3XX, 4XX, or 5XX. You can select several. If you select none or include ALL, everything is shown.

View more

Each load fetches 100 entries, from newest to oldest. Scroll to the bottom and click Load more (加载更多) to see earlier logs. The page doesn't refresh automatically. Click Refresh (刷新) to get the latest logs.

Field descriptions

ColumnDescription
CODEThe HTTP status code. Green for 2XX, orange for 3XX, pink for 4XX, red for 5XX
Method (方式)The request method, such as GET, PUT, HEAD
Access time (访问时间)The request time, shown in your computer's time zone
IP address (IP地址)The visitor's IP. CDN logs also show a country or region flag
Size (大小)The bytes transferred by this request, converted in powers of 1000
Path (路径)The full URL. Bucket logs include query parameters

Hovering over Path shows more information:

FieldDescription
Request IDOnly CDN logs have it
User AgentThe client identifier
RefererThe referring page. Shows "空" (empty) when there is none

Limits

  • You can view only the last 3 days of logs. For a longer period, use the log API to pull logs on a schedule and store them yourself.
  • The console has no export feature and can't search by path, IP, or Referer. When you need that, pull with the API and analyze.
  • CDN requests that hit the cache appear only in CDN logs, not in bucket logs. Every CDN request you can see in bucket logs is an origin fetch.

Pull logs with the API

curl -G "https://api.bitiful.com/s4/data/<bucket-name>/logs" \
  -H "Authorization: <API Token>" \
  --data-urlencode "start_time=$(date +%s)000000000" \
  --data-urlencode "codes=4XX,5XX" \
  --data-urlencode "limit=1000"

start_time is the upper bound of the query, and logs earlier than it are returned. For parameters, response fields, and pagination, see the Object storage API and the Static CDN API.

Troubleshoot with logs

SymptomWhat to look at first
Lots of 403sCheck whether Path has signature parameters. Requests without a signature are anonymous access, so check public read and access control. For signed ones, check whether the signature has expired. See Error codes and troubleshooting
Traffic suddenly risesLook at Size and Referer to find the hotlinked files and the referring sites, then set up hotlink protection
Lots of 404sCheck whether Path has extra or missing directories, and whether the case matches
5XXNote the time, the path, and the x-amz-request-id in the response headers, and contact support

FAQ

Why can't I see a request I just made?

Logs are near real time, so there's usually a short delay. Wait a moment and click Refresh.

Why isn't my CDN domain in the drop-down?

Only CDN domains under your current account are shown. For a domain you just created that hasn't had any requests, the list is empty after you select it.

Why don't the request counts in the logs match my bill?

Logs are for troubleshooting. Billing follows Charges.