pub struct PublisherOptions<'t> { /* private fields */ }
Expand description
Options to configure a Publisher
.
Implementations§
Source§impl PublisherOptions<'_>
impl PublisherOptions<'_>
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates a PublishOptions
with all sets either empty or set to false. This is
useful when fine grain control of Publisher
and its behavior is necessary.
However, for the majority of binaries that “just want to log”,
PublishOptions::default
is preferred as that brings all the default
configuration that is desired in most scenarios.
Source§impl<'t> PublisherOptions<'t>
impl<'t> PublisherOptions<'t>
Sourcepub fn wait_for_initial_interest(self, enable: bool) -> Self
pub fn wait_for_initial_interest(self, enable: bool) -> Self
Whether or not to block on initial runtime interest being received before starting to emit log records using the default interest configured.
It’s recommended that this is set when developing to guarantee that a dynamically configured minimum severity makes it to the component before it starts emitting logs.
Default: true.
Sourcepub fn listen_for_interest_updates(self, enable: bool) -> Self
pub fn listen_for_interest_updates(self, enable: bool) -> Self
When set, a fuchsia_async::Task
will be spawned and held that will be
listening for interest changes.
Default: true
Sourcepub fn use_log_sink(self, proxy: LogSinkProxy) -> Self
pub fn use_log_sink(self, proxy: LogSinkProxy) -> Self
Sets the LogSink
that will be used.
Default: the fuchsia.logger.LogSink
available in the incoming namespace.
Source§impl<'t> PublisherOptions<'t>
impl<'t> PublisherOptions<'t>
Sets the tags applied to all published events.
When set to an empty slice (the default), events are tagged with the moniker of the component in which they are recorded.
Default: empty.
Sourcepub fn enable_metatag(self, metatag: Metatag) -> Self
pub fn enable_metatag(self, metatag: Metatag) -> Self
Enable a metatag. It’ll be applied to all published events.
Default: no metatags are enabled.
Sourcepub fn minimum_severity(self, severity: impl Into<Severity>) -> Self
pub fn minimum_severity(self, severity: impl Into<Severity>) -> Self
An interest filter to apply to messages published.
Default: EMPTY, which implies INFO.