pub struct PublishOptions<'t> { /* private fields */ }
Expand description
Options to configure publishing. This is for initialization of logs, it’s a superset of
PublisherOptions
.
Implementations§
Source§impl<'t> PublishOptions<'t>
impl<'t> PublishOptions<'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 PublishOptions<'_>
impl PublishOptions<'_>
Sourcepub fn install_panic_hook(self, enable: bool) -> Self
pub fn install_panic_hook(self, enable: bool) -> Self
Whether or not to install a panic hook which will log an ERROR whenever a panic happens.
Default: true.
Sourcepub fn always_log_file_line(self) -> Self
pub fn always_log_file_line(self) -> Self
Enable to always log file/line information, otherwise only log when severity is ERROR or above.
Sourcepub fn panic_prefix(self, prefix: &'static str) -> Self
pub fn panic_prefix(self, prefix: &'static str) -> Self
Override the default string prefix for a logged panic message.
Source§impl<'t> PublishOptions<'t>
impl<'t> PublishOptions<'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.