Export and Pipe¶
Export filtered logs to files or pipe to external commands.
Export to File¶
Basic Export¶
Exports the current buffer (filtered entries) to a file.
Export Formats¶
export --format text /tmp/logs.txt # Plain text (default)
export --format json /tmp/logs.json # JSON Lines
export --format csv /tmp/logs.csv # CSV
Append Mode¶
Appends to existing file instead of overwriting.
Time-Scoped Export¶
Export only entries from the last hour.
Continuous Export¶
Continuously writes new entries (like tail -f | tee). Shows entries on screen while writing to file.
Press Ctrl+C to stop.
Pipe to Commands¶
Basic Pipe¶
Pipes filtered entries to an external command.
With Format¶
Examples¶
pipe grep ERROR # Search within entries
pipe wc -l # Count entries
pipe sort | uniq -c # Count unique messages
pipe --format json jq -r '.sql_state' | sort | uniq -c
Buffer Behavior¶
Export and pipe commands work with the tailer buffer:
- Buffer holds up to 10,000 entries (configurable)
- Entries are filtered before export
- Both streaming mode and Textual mode populate the buffer
Requirements¶
For export/pipe to work:
- You must have tailed an instance first (
tail <id>) - The buffer must have entries
If you see "No log file loaded", run tail <id> first.
Configuration¶
Buffer Size¶
Export After Textual Mode¶
After exiting Textual tail mode, the buffer is preserved. You can immediately export: