pub struct LogCommand {Show 25 fields
pub sub_command: Option<LogSubCommand>,
pub filter: Vec<String>,
pub moniker: Vec<String>,
pub component: Vec<String>,
pub exclude: Vec<String>,
pub tag: Vec<String>,
pub exclude_tags: Vec<String>,
pub severity: Severity,
pub kernel: bool,
pub since: Option<DetailedDateTime>,
pub since_boot: Option<Duration>,
pub until: Option<DetailedDateTime>,
pub until_boot: Option<Duration>,
pub hide_tags: bool,
pub hide_file: bool,
pub no_color: bool,
pub case_sensitive: bool,
pub show_metadata: bool,
pub show_full_moniker: bool,
pub clock: TimeFormat,
pub set_severity: Vec<OneOrMany<LogInterestSelector>>,
pub pid: Option<u64>,
pub tid: Option<u64>,
pub force_set_severity: bool,
pub json: bool,
}
Fields§
§sub_command: Option<LogSubCommand>
§filter: Vec<String>
filter for a string in either the message, component or url. May be repeated.
moniker: Vec<String>
DEPRECATED: use –component
component: Vec<String>
fuzzy search for a component by moniker or url. May be repeated.
exclude: Vec<String>
exclude a string in either the message, component or url. May be repeated.
tag: Vec<String>
filter for only logs with a given tag. May be repeated.
exclude logs with a given tag. May be repeated.
severity: Severity
set the minimum severity. Accepted values (from lower to higher) are: trace, debug, info, warn (or warning), error, fatal. This field is case insensitive.
kernel: bool
outputs only kernel logs, unless combined with –component.
since: Option<DetailedDateTime>
show only logs after a certain time (exclusive)
since_boot: Option<Duration>
show only logs after a certain time (as a boot timestamp: seconds from the target’s boot time).
until: Option<DetailedDateTime>
show only logs until a certain time (exclusive)
until_boot: Option<Duration>
show only logs until a certain time (as a a boot timestamp: seconds since the target’s boot time).
hide the tag field from output (does not exclude any log messages)
hide_file: bool
hide the file and line number field from output (does not exclude any log messages)
no_color: bool
disable coloring logs according to severity.
Note that you can permanently disable this with
ffx config set log_cmd.color false
case_sensitive: bool
if enabled, text filtering options are case-sensitive this applies to –filter and –exclude.
show_metadata: bool
shows process-id and thread-id in log output
show_full_moniker: bool
shows the full moniker in log output. By default this is false and only the last segment of the moniker is printed.
clock: TimeFormat
how to display log timestamps. Options are “utc”, “local”, or “boot” (i.e. nanos since target boot). Default is boot.
set_severity: Vec<OneOrMany<LogInterestSelector>>
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
pid: Option<u64>
filters by pid
tid: Option<u64>
filters by tid
force_set_severity: bool
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. This applies to both –set-severity and –set-severity-persist.
json: bool
enables structured JSON logs.
Implementations§
Source§impl LogCommand
impl LogCommand
pub fn validate_cmd_flags_with_warnings( &mut self, ) -> Result<Vec<&'static str>, LogError>
Sourcepub async fn maybe_set_interest(
&self,
log_settings_client: &LogSettingsProxy,
realm_query: &impl InstanceGetter,
) -> Result<(), LogError>
pub async fn maybe_set_interest( &self, log_settings_client: &LogSettingsProxy, realm_query: &impl InstanceGetter, ) -> Result<(), LogError>
Sets interest based on configured selectors. If a single ambiguous match is found, the monikers in the selectors are automatically re-written.
Trait Implementations§
Source§impl ArgsInfo for LogCommand
impl ArgsInfo for LogCommand
Source§fn get_args_info() -> CommandInfoWithArgs
fn get_args_info() -> CommandInfoWithArgs
§fn get_subcommands() -> Vec<SubCommandInfo<'static>>
fn get_subcommands() -> Vec<SubCommandInfo<'static>>
Source§impl Clone for LogCommand
impl Clone for LogCommand
Source§fn clone(&self) -> LogCommand
fn clone(&self) -> LogCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LogCommand
impl Debug for LogCommand
Source§impl Default for LogCommand
impl Default for LogCommand
Source§impl FromArgs for LogCommand
impl FromArgs for LogCommand
Source§fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>
fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>
Source§fn redact_arg_values(
__cmd_name: &[&str],
__args: &[&str],
) -> Result<Vec<String>, EarlyExit>
fn redact_arg_values( __cmd_name: &[&str], __args: &[&str], ) -> Result<Vec<String>, EarlyExit>
Source§impl PartialEq for LogCommand
impl PartialEq for LogCommand
Source§impl SubCommand for LogCommand
impl SubCommand for LogCommand
impl StructuralPartialEq for LogCommand
impl TopLevelCommand for LogCommand
Auto Trait Implementations§
impl Freeze for LogCommand
impl RefUnwindSafe for LogCommand
impl Send for LogCommand
impl Sync for LogCommand
impl Unpin for LogCommand
impl UnwindSafe for LogCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more