log_listener CLI
The log_listener
binary is included in all device builds that include pkgfs
and is currently
the primary tool used by engineers to interactively read a live log stream. In-tree developers
usually invoke it with fx log
.
Flag | Notes |
—only <comma-separated-words>
|
Include lines containing at least one of the specified words. If this is not set, it has no effect. |
—suppress <comma-separated-words>
|
Exclude lines containing any of the specified words. |
—begin <comma-separated-words>
|
Include blocks starting with at least one of the specified words. Pair with the —end flag. Defaults to off.
|
—end <comma-separated-words>
|
Exclude blocks starting with at least one of the specified words. Pair with the —begin flag. Defaults to off.
|
—tag <string>
|
Tag(s) to include. Use multiple times for multiple tags. By default no tag filtering is performed, only specified tags are allowed if any are specified. |
—ignore-tag <string>
|
Tag(s) to ignore. Use multiple times for multiple tags. |
—pid <integer>
|
Only print logs from the given process koid. |
—tid <integer>
|
Only print logs from the given thread koid. |
—pretty yes
|
Activate colors. |
—severity <level>
|
Minimum severity to include. Defaults to INFO .
Does not have any impact on the logs produced by components.
|
—file <string>
|
Path where logs will be written. By default logs are written to stdout. |
—file_capacity <integer>
|
The maximum allowed amount of disk space to consume. Once the file being written to reaches
half of the capacity, it is moved to FILE.old and a new log file is created.
Defaults to 64000. If —file is not specified, it has no effect. Setting to 0 disables this functionality. |
—startup_sleep <integer>
|
Sleep for this number of milliseconds on program startup. |
—clock <Monotonic|UTC|Local>
|
Clock to use when printing timestamps.
Monotonic (default): Monotonic time reported by the kernel. UTC: UTC time as reported by the runtime. Local: Localized wall time. |
—time_format <format>
|
If —clock is not MONOTONIC, specify timestamp format.
See the chrono crate’s docs for format specifiers. Defaults to “%Y-%m-%d %H:%M:%S”. |
—since_now yes
|
Ignore all logs from before this command is invoked. |
—dump_logs yes
|
Exit after printing already-available logs. |
—help | -h
|
Prints usage. |