Struct sirlog::Configuration [−][src]
A logging configuration
Fields
destination: Sender<Arc<Log>>
the destination for log messages to be delivered
process: String
the name of the process that generates the logs being sent
Implementations
impl Configuration
[src]
pub fn named<S: Display>(process: S, sender: Sender<Arc<Log>>) -> Self
[src]
Create a new configuration using the
pub fn set_global(config: Self)
[src]
Set the global logging configuration. If no other configuration is found, this one is used.
Panics
Panics if another global logging configuration has already been set
pub async fn run<F: Future<Output = R> + Send, R: Send>(self, future: F) -> R
[src]
Executes a Future
with the configuration. Log messages from within
code executed by the future will be submitted through this configuration
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl !UnwindSafe for Configuration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,