本页还没有译文
本页 9 段还没译成简体中文,下面显示的是英文原文。Logs
还没翻译译自英文(supabase.com)本页 9 段都还没译
Open Logs and select Storage as the log type to inspect Storage service events. Filter by time and event message to find a request.
For more advanced filtering needs, use the Explorer after selecting Run SQL, query source Logs, and a time range to query the Storage logs directly. A Logs query runs ClickHouse SQL rather than Postgres SQL. Every log line is a row in the logs table, tagged by a source column, with structured fields in a log_attributes map.
Note
For more details on filtering the log tables, see Query logs with SQL
Example Storage queries
Filter by status 5XX error
select
id,
timestamp,
event_message,
toInt32OrZero(log_attributes['res.statusCode']) as statusCode,
log_attributes['error.message'] as errorMessage,
log_attributes['error.raw'] as rawError
from logs
where source = 'storage_logs'
and toInt32OrZero(log_attributes['res.statusCode']) >= 500
order by timestamp desc
limit 100;Filter by status 4XX error
select
id,
timestamp,
event_message,
toInt32OrZero(log_attributes['res.statusCode']) as statusCode,
log_attributes['error.message'] as errorMessage,
log_attributes['error.raw'] as rawError
from logs
where source = 'storage_logs'
and toInt32OrZero(log_attributes['res.statusCode']) between 400 and 499
order by timestamp desc
limit 100;Filter by method
select id, timestamp, event_message, log_attributes['req.method'] as method
from logs
where source = 'storage_logs'
and log_attributes['req.method'] in ('POST')
order by timestamp desc
limit 100;Filter by IP address
select id, timestamp, event_message, log_attributes['req.remoteAddress'] as remoteAddress
from logs
where source = 'storage_logs'
and log_attributes['req.remoteAddress'] in ('IP_ADDRESS')
order by timestamp desc
limit 100;AI 翻译查看英文原文