Skip to main content

LogCommand

Struct LogCommand 

Source
pub struct LogCommand {
    pub sub_command: Option<LogSubCommand>,
    pub dump: bool,
    pub set_severity: Vec<OneOrMany<LogInterestSelector>>,
    pub filters: LogFilterArgs,
}
Expand description

Consolidated log command representation containing merged filter criteria and subcommands.

Fields§

§sub_command: Option<LogSubCommand>§dump: bool§set_severity: Vec<OneOrMany<LogInterestSelector>>§filters: LogFilterArgs

Implementations§

Source§

impl LogCommand

Source

pub fn merge_subcommand(&mut self)

Merges subcommand filter overrides (e.g. dump or watch) into self.filters.

Source§

impl LogCommand

Source

pub fn severity(&self) -> Severity

Returns the minimum log severity.

Source

pub fn clock(&self) -> TimeFormat

Returns the timestamp display format.

Source

pub fn encoding(&self) -> LogEncoding

Returns the log encoding format.

Source

pub fn filter(&self) -> &[String]

Returns the log text filter patterns.

Source

pub fn moniker(&self) -> &[String]

Returns the deprecated moniker filter patterns.

Source

pub fn component(&self) -> &[String]

Returns the component filter patterns.

Source

pub fn exclude(&self) -> &[String]

Returns the text exclusion patterns.

Source

pub fn exclude_regex(&self) -> &[String]

Returns the regular expression exclusion patterns.

Source

pub fn tag(&self) -> &[String]

Returns the tag filter patterns.

Source

pub fn exclude_tags(&self) -> &[String]

Returns the tag exclusion patterns.

Source

pub fn hide_tags(&self) -> bool

Returns whether tags are hidden from output.

Source

pub fn no_color(&self) -> bool

Returns whether colored output is disabled.

Source

pub fn set_no_color(&mut self, no_color: bool)

Sets whether colored output is disabled.

Source

pub fn show_metadata(&self) -> bool

Returns whether PID and TID metadata are displayed.

Source

pub fn hide_file(&self) -> bool

Returns whether file and line number locations are hidden.

Source

pub fn hide_moniker(&self) -> bool

Returns whether monikers are hidden from output.

Source

pub fn show_full_moniker(&self) -> bool

Returns whether full monikers are displayed.

Source

pub fn prefer_url_component_name(&self) -> bool

Returns whether component URL is preferred over moniker for display.

Source

pub fn since(&self) -> Option<&DetailedDateTime>

Returns the starting timestamp filter.

Source

pub fn until(&self) -> Option<&DetailedDateTime>

Returns the ending timestamp filter.

Source

pub fn since_boot(&self) -> Option<Duration>

Returns the starting boot duration filter.

Source

pub fn until_boot(&self) -> Option<Duration>

Returns the ending boot duration filter.

Source

pub fn json(&self) -> bool

Returns whether JSON output is enabled.

Source

pub fn exclude_regex_file(&self) -> Option<&str>

Returns the path to the regex exclusion file, if set.

Source

pub fn kernel(&self) -> bool

Returns whether only kernel logs should be displayed.

Source

pub fn force_set_severity(&self) -> bool

Returns whether severity selectors bypass ambiguity checks.

Source

pub fn case_sensitive(&self) -> bool

Returns whether text filtering is case-sensitive.

Source

pub fn pid(&self) -> Option<u64>

Returns the process ID filter, if set.

Source

pub fn tid(&self) -> Option<u64>

Returns the thread ID filter, if set.

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.
Source§

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

Returns the list of subcommands
Source§

impl Clone for LogCommand

Source§

fn clone(&self) -> LogCommand

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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() -> LogCommand

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

impl FromArgs for LogCommand

Source§

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

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

fn redact_arg_values( _command_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 (const: unstable) · 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 StructuralPartialEq for LogCommand

Source§

impl SubCommand for LogCommand

Source§

const COMMAND: &'static CommandInfo = RawLogCommand::COMMAND

Information about the subcommand.
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, dest: *mut u8)

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

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

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

Source§

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, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

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<F, N> FidlIntoNative<Box<N>> for F
where F: FidlIntoNative<N>,

§

fn fidl_into_native(self) -> Box<N>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> InstanceFromServiceTransport<T> for T

§

fn from_service_transport(handle: T) -> T

Converts the given service transport handle of type T to [Self]
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<E> RunsTransport<Mpsc> for E

§

impl<E> RunsTransport<Mpsc> for E
where E: RunsTransport<Mpsc>,

Source§

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

Source§

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

Info for the commands.
Source§

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