blob: c01bb4612e395c4eccc1d4620b9ae97cb64af296 [file] [log] [blame]
{
"name": "log",
"description": "Display logs from a target device",
"examples": [
"Dump the most recent logs and stream new ones as they happen:\n $ ffx log\n\nStream new logs starting from the current time, filtering for severity of at least \"WARN\":\n $ ffx log --severity warn --since now\n\nStream logs where the source moniker, component url and message do not include \"sys\":\n $ ffx log --exclude sys\n\nStream ERROR logs with source moniker, component url or message containing either\n\"netstack\" or \"remote-control.cm\", but not containing \"sys\":\n $ ffx log --severity error --filter netstack --filter remote-control.cm --exclude sys\n\nDump all available logs where the source moniker, component url, or message contains\n\"remote-control\":\n $ ffx log --filter remote-control dump\n\nDump all logs from the last 30 minutes logged before 5 minutes ago:\n $ ffx log --since \"30m ago\" --until \"5m ago\" dump\n\nEnable DEBUG logs from the \"core/audio\" component while logs are streaming:\n $ ffx log --select core/audio#DEBUG"
],
"flags": [
{
"kind": "Switch",
"optionality": "optional",
"long": "--help",
"short": null,
"description": "display usage information",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "filter"
}
},
"optionality": "repeating",
"long": "--filter",
"short": null,
"description": "filter for a string in either the message, component or url. May be repeated.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "moniker"
}
},
"optionality": "repeating",
"long": "--moniker",
"short": null,
"description": "filter for a component moniker. May be repeated.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "exclude"
}
},
"optionality": "repeating",
"long": "--exclude",
"short": null,
"description": "exclude a string in either the message, component or url. May be repeated.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "tag"
}
},
"optionality": "repeating",
"long": "--tag",
"short": null,
"description": "filter for only logs with a given tag. May be repeated.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "exclude-tags"
}
},
"optionality": "repeating",
"long": "--exclude-tags",
"short": null,
"description": "exclude logs with a given tag. May be repeated.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "severity"
}
},
"optionality": "optional",
"long": "--severity",
"short": null,
"description": "set the minimum severity. Accepted values (from lower to higher) are: trace, debug, info, warn (or warning), error, fatal. This field is case insensitive.",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--kernel",
"short": null,
"description": "outputs only kernel logs. Overrides any other moniker specified.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "since"
}
},
"optionality": "optional",
"long": "--since",
"short": null,
"description": "show only logs after a certain time (exclusive)",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "since-monotonic"
}
},
"optionality": "optional",
"long": "--since-monotonic",
"short": null,
"description": "show only logs after a certain time (as a monotonic timestamp: seconds from the target's boot time).",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "until"
}
},
"optionality": "optional",
"long": "--until",
"short": null,
"description": "show only logs until a certain time (exclusive)",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "until-monotonic"
}
},
"optionality": "optional",
"long": "--until-monotonic",
"short": null,
"description": "show only logs until a certain time (as a monotonic timestamp: seconds since the target's boot time).",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--hide-tags",
"short": null,
"description": "hide the tag field from output (does not exclude any log messages)",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--hide-file",
"short": null,
"description": "hide the file and line number field from output (does not exclude any log messages)",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--no-color",
"short": null,
"description": "disable coloring logs according to severity. Note that you can permanently disable this with `ffx config set log_cmd.color false`",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--show-metadata",
"short": null,
"description": "shows process-id and thread-id in log output",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--show-full-moniker",
"short": null,
"description": "shows the full moniker in log output. By default this is false and only the last segment of the moniker is printed.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "clock"
}
},
"optionality": "optional",
"long": "--clock",
"short": null,
"description": "how to display log timestamps. Options are \"utc\", \"local\", or \"monotonic\" (i.e. nanos since target boot). Default is monotonic.",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--raw",
"short": null,
"description": "if provided, logs will not be symbolized",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--no-symbolize",
"short": null,
"description": "if provided, the symbolizer will not be spawned like raw, but actually disables the symbolizer process.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "symbolize"
}
},
"optionality": "optional",
"long": "--symbolize",
"short": null,
"description": "configure symbolization options. Valid options are: - pretty (default): pretty concise symbolization - off: disables all symbolization - classic: traiditional, non-prettified symbolization",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "select"
}
},
"optionality": "repeating",
"long": "--select",
"short": null,
"description": "configure the log settings on the target device for components matching the given selector. This modifies the minimum log severity level emitted by components during the logging session. Specify using the format <component-selector>#<log-level>, with level as one of FATAL|ERROR|WARN|INFO|DEBUG|TRACE. May be repeated.",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "pid"
}
},
"optionality": "optional",
"long": "--pid",
"short": null,
"description": "filters by pid",
"hidden": false
},
{
"kind": {
"Option": {
"arg_name": "tid"
}
},
"optionality": "optional",
"long": "--tid",
"short": null,
"description": "filters by tid",
"hidden": false
},
{
"kind": "Switch",
"optionality": "optional",
"long": "--force-select",
"short": null,
"description": "if enabled, selectors will be passed directly to Archivist without any filtering. If disabled and no matching components are found, the user will be prompted to either enable this or be given a list of selectors to choose from.",
"hidden": false
}
],
"notes": [
"Logs are retrieve from the target at the moment this command is called.\n\nYou may see some additional information attached to the log line:\n\n- `dropped=N`: this means that N logs attributed to the component were dropped when the component\n wrote to the log socket. This can happen when archivist cannot keep up with the rate of logs being\n emitted by the component and the component filled the log socket buffer in the kernel.\n\n- `rolled=N`: this means that N logs rolled out from the archivist buffer and ffx never saw them.\n This can happen when more logs are being ingested by the archivist across all components and the\n ffx couldn't retrieve them fast enough.\n\nSymbolization is performed in the background using the symbolizer host tool. You can pass\nadditional arguments to the symbolizer tool (for example, to add a remote symbol server) using:\n $ ffx config set proactive_log.symbolize.extra_args \"--symbol-server gs://some-url/path --symbol-server gs://some-other-url/path ...\"\n\nTo learn more about configuring the log viewer, visit https://fuchsia.dev/fuchsia-src/development/tools/ffx/commands/log"
],
"commands": [],
"positionals": [],
"error_codes": []
}