# oss-logging-guide

Part of **OSS**

# Object Storage Service Logging Console Guide

## Operations Overview

| Operation | Console Navigation Path | Prerequisites | Description |
|----------|------------------------|---------------|-------------|
| View and Analyze Storage Access Logs | Console > Object Storage OSS > Log Management | - OSS service activated<br>- Bucket created<br>- Access logging enabled on the bucket | Query and filter bucket access logs by time, request type, or status code |

## Step-by-Step Instructions

### View and Analyze Storage Access Logs

**Navigation**: Console > Object Storage OSS > Log Management

**Prerequisites**:
- OSS service has been activated
- A storage bucket (Bucket) has been created
- Access logging has been enabled for the target bucket

1. Navigate to the **Log Management** page  
   - Element: **Log Management** (menu) — located in the left navigation panel  
   - Notes: This menu item is only visible if you have appropriate permissions and OSS is activated

2. Select the target storage bucket from the dropdown list  
   - Element: **Storage Bucket Dropdown** (dropdown) — located in the top section of the page  
   - Notes: Only buckets with access logging enabled are displayed in this list

3. Configure optional query filters (time range, request type, status code)  
   - Element: **Time Range** (date_picker) — in the query conditions area  
   - Element: **Request Type** (dropdown) — options include GET, PUT, POST, DELETE, HEAD  
   - Element: **Status Code** (text_input) — enter a specific HTTP status code (e.g., 200, 404)

4. Click the **Query** button to retrieve logs  
   - Element: **Query** (button) — located in the query conditions area  
   - Notes: Results are limited to 1,000 log entries per query. The page may take a few seconds to load results.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Time Range | date_picker | No | — | Specify the time interval for log retrieval |
| Request Type | dropdown | No | GET, PUT, POST, DELETE, HEAD | Filter logs by HTTP request method |
| Status Code | text_input | No | — | Enter a specific HTTP status code to filter results |

## FAQ

Q: Where can I find the Log Management page in the OSS console?  
A: Go to the OSS console, then use the left navigation panel to click **Log Management** under the main OSS menu.

Q: Why don’t I see my bucket in the Storage Bucket Dropdown?  
A: Only buckets with access logging explicitly enabled will appear. Ensure logging is turned on for your bucket via the bucket settings.

Q: Can I export or download the query results?  
A: The current console interface displays logs in a table view but does not provide a direct export button. You may need to use other tools like ossutil or APIs for bulk log retrieval.

Q: What happens if I leave all filter fields blank?  
A: The system will return up to 1,000 recent log entries for the selected bucket within the default time window (usually the last 24 hours).

Q: Do I need special permissions to view access logs?  
A: Yes, your RAM user must have the `oss:GetBucketLogging` and `oss:ListObjects` permissions for the target bucket and its log destination.

## Pricing & Billing

### Billing Model
Billing is based on the number of log query requests. Each query (clicking the **Query** button) counts as one request, regardless of result volume.

### Price Reference

| Tier | Input Price | Output Price | Other Price |
|------|-------------|--------------|-------------|
| Standard | ¥0.0005 per request | ¥0.0005 per request | — |

### Free Tier
The first 1,000 log queries per month are free of charge.

### Billing Notes
- Log storage costs are billed separately based on storage capacity and retention period.
- Each query is counted as one billable request, even if no logs match the filters.
- Queries returning more than 1,000 records are still capped at 1,000 and count as a single request.