{{define "content"}} {{$f := .Data.Filter}}{{$csrf := .CSRF}}

Query Log

Every query this server answered, when logging is enabled.

Logging settings {{template "confirmform" dict "Action" "/querylog/clear" "CSRF" $csrf "Label" "Clear log" "Icon" "bi-trash" "Class" "btn btn-sm btn-outline-danger" "Message" "Delete every row in the query log? This cannot be undone."}}
{{if not .Data.Enabled}}
Query logging is turned off, so no new queries are being recorded. Turn it on to populate this page and the dashboard charts.
{{end}} {{if gt .Data.Stats.Dropped 0}}
{{num .Data.Stats.Dropped}} log entries were dropped because the writer could not keep up. Query answering is never delayed by logging, so under sustained load some records are discarded rather than queued.
{{end}}
{{if .Data.Entries}}
{{range .Data.Entries}} {{end}}
TimeClientNetworkQueryType ResultSourceMatchedTook
{{timeOnly .Timestamp}} {{.ClientIP}} {{default "—" .NetworkName}} {{trimDot .QName}} {{.QType}} {{.Rcode}} {{if .Blocked}}blocked{{end}} {{.Source}} {{if .Blocked}} {{.BlacklistName}} {{if .MatchedRule}}
{{.MatchedRule}}
{{end}} {{else if .CacheHit}} cache hit {{else}} {{end}}
{{ms .DurationMS}}
{{template "pagination" dict "P" .Data.Pagination "Q" .Query}} {{else}} {{template "empty" dict "Icon" "bi-journal-text" "Title" "No queries match" "Message" "Either nothing has been logged yet, or the filters above exclude everything. Clear the filters to see the whole log."}} {{end}}
{{end}}