Struct LogCommand

Source
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_tags: Vec<String>

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_tags: bool

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 #, with level as one of FATAL|ERROR|WARN|INFO|DEBUG|TRACE. May be repeated and it’s also possible to pass multiple comma-separated strings per invocation. Cannot be used in conjunction with –set-severity-persist.

§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

Source

pub fn validate_cmd_flags_with_warnings( &mut self, ) -> Result<Vec<&'static str>, LogError>

Source

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

Source§

fn get_args_info() -> CommandInfoWithArgs

Returns the argument info.
§

fn get_subcommands() -> Vec<SubCommandInfo<'static>>

Returns the list of subcommands
Source§

impl Clone for LogCommand

Source§

fn clone(&self) -> LogCommand

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LogCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LogCommand

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl FromArgs for LogCommand

Source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
Source§

fn redact_arg_values( __cmd_name: &[&str], __args: &[&str], ) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but without the values of the options and arguments. This can be useful as a means to capture anonymous usage statistics without revealing the content entered by the end user. Read more
Source§

impl PartialEq for LogCommand

Source§

fn eq(&self, other: &LogCommand) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SubCommand for LogCommand

Source§

const COMMAND: &'static CommandInfo

Information about the subcommand.
Source§

impl StructuralPartialEq for LogCommand

Source§

impl TopLevelCommand for LogCommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> SubCommands for T
where T: SubCommand,

§

const COMMANDS: &'static [&'static CommandInfo<'static>]

Info for the commands.
§

fn dynamic_commands() -> &'static [&'static CommandInfo<'static>]

Get a list of commands that are discovered at runtime.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V