Skip to content

Querying Logs

The query command retrieves stored entries and prints them to stdout. Filter by time range or retrieve all entries.

FlagDescriptionExample
--fromFilter from time--from 1h
--toFilter until time--to "2026-01-30"
--formatOutput formattext, json, csv, hex
--limitMaximum entries to return--limit 1000

Without filters, query returns up to 1000 entries. Use --limit 0 to return all.

Terminal
kifa query -d ./data --from 1h # Last hour
kifa query -d ./data --from 30m # Last 30 minutes
kifa query -d ./data --from 2d # Last 2 days
kifa query -d ./data --from 1h30m # Last 1.5 hours
Terminal
kifa query -d ./data --format text
Output
2026-01-31 18:30:00 UTC {"txn":"TXN-001","amount":5000}

Time filters can be combined to select a specific window:

Terminal
kifa query -d ./data --from 24h --to 1h