Struct slog_telegraf::TelegrafDrainBuilder [−][src]
Telegraf Drain
builder
use slog::*; use slog_telegraf::{TelegrafDrainBuilder, Client}; let client = Client::new("tcp://127.0.0.1:8094".into()).unwrap(); let drain = TelegrafDrainBuilder::new(client, "measurement".into()) .add_tag_kv(o!("key" => "value")).build().fuse(); // ...
Implementations
impl TelegrafDrainBuilder
[src]
pub fn new(client: Client, measurement: String) -> Self
[src]
pub fn build(self) -> TelegrafDrain
[src]
Build the 'Drain'
pub fn add_tag_kv<T>(self, value: OwnedKV<T>) -> Self where
T: SendSyncRefUnwindSafeKV + 'static,
[src]
T: SendSyncRefUnwindSafeKV + 'static,
Add custom tags to be used in every log statement
pub fn default_tags(self) -> Self
[src]
Adds default tags
level
- record logging level integer, "Critical is the smallest and Trace the biggest value" - slog::Level, docs.rs/slogmsg
- The logged messagemod
- The source module of the log message, e.g. 'your_crate::main'
Auto Trait Implementations
impl RefUnwindSafe for TelegrafDrainBuilder
[src]
impl Send for TelegrafDrainBuilder
[src]
impl Sync for TelegrafDrainBuilder
[src]
impl Unpin for TelegrafDrainBuilder
[src]
impl UnwindSafe for TelegrafDrainBuilder
[src]
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> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
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>,