pub struct PublisherOptions<'t> { /* private fields */ }
Expand description
Options to configure a Publisher
.
Implementations§
Source§impl<'t> PublisherOptions<'t>
impl<'t> PublisherOptions<'t>
Sourcepub fn log_file_line_info(self, enable: bool) -> Self
pub fn log_file_line_info(self, enable: bool) -> Self
Whether or not to log file/line information regardless of severity.
Default: false.
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. This option can only be set if
register_global_logger
is set.
Default: true for PublishOptions
, false for PublisherOptions
.
Sourcepub fn use_log_sink(self, client: ClientEnd<LogSinkMarker>) -> Self
pub fn use_log_sink(self, client: ClientEnd<LogSinkMarker>) -> Self
Sets the LogSink
that will be used.
Default: the fuchsia.logger.LogSink
available in the incoming namespace.
Sourcepub fn blocking(self, is_blocking: bool) -> Self
pub fn blocking(self, is_blocking: bool) -> Self
When set to true, writes to the log socket will be blocking. This is, we’ll retry every time the socket buffer is full until we are able to write the log.
Default: false
Sourcepub fn register_global_logger(self, value: bool) -> Self
pub fn register_global_logger(self, value: bool) -> Self
When set to true, the publisher will be registered as the global logger. This can only be done once.
Default: true for PublishOptions
, false for PublisherOptions
.
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.