Streaming Logs using Logfire Cli
The Logfire CLI provides an interactive Text-Based User Interface (TUI) through the stream
command to stream logs in real-time. This feature is rich in options and has an autocomplete feature to make it user-friendly.
Usage
Interactive TUI
To access the interactive TUI, type logfire stream
in your terminal:
$ logfire stream
Once in the TUI, you have the following options that you can use. All of them have autocomplete features to make it easier for you to use:
source: Filter the logs by the source.
Usage:
source=source-name,source-name,source-name...
start-date: Define the start date for logs you want to stream.
Usage:
start-date=now-2d
end-date: Define the end date for the logs you want to stream.
Usage:
end-date=now
field-filter: Filter logs based on specific fields like
level
,host
, etc.Usage:
field-filter=level=info
save-view: Save the current log view with a specific name.
Usage:
save-view=name
stream-view: Stream logs from a saved view.
Usage:
stream-view=view-name
QUIT: Exit the TUI.
Usage:
q
,quit
, orexit
Just type your choice, and the autocomplete will assist you in completing the command.