[][src]Struct slog_loggly::LogglyDrainBuilder

pub struct LogglyDrainBuilder { /* fields omitted */ }

Loggly drain builder.

Methods

impl LogglyDrainBuilder[src]

pub fn debug_mode(self, enable: bool) -> LogglyDrainBuilder[src]

Enable or disable debug mode (it's disabled by default). In the debug mode you'll be able to see some runtime info on stderr that will help you with setting up the drain (e.g. failed requests). With debug mode disabled, all errors will be silently ignored.

pub fn queue_max_size(self, size: usize) -> LogglyDrainBuilder[src]

Set a given maximum size of the message queue (the default is unlimited).

pub fn batch_size(self, size: usize) -> LogglyDrainBuilder[src]

Maximum number of messages sent in one batch (the default is 20). Please note that all log messages are sent as soon as possible. Increasing batch size won't cause any delays in sending messages. If there is not enough messages in the internal queue to make a maximum size batch, a smaller batch is sent.

pub fn sender_count(self, count: usize) -> LogglyDrainBuilder[src]

Set the number of concurrent senders (the default is 16).

pub fn request_timeout(self, timeout: Duration) -> LogglyDrainBuilder[src]

Set Loggly request timeout (the default is 5 seconds).

pub fn connector(
    self,
    connector: HttpsConnector<HttpConnector>
) -> LogglyDrainBuilder
[src]

Use a given HttpsConnector. The connector is used only if the log message sender is spawned as a task.

pub fn build(
    self
) -> Result<(LogglyDrain, LogglyMessageSender, FlushHandle), Error>
[src]

Build a Loggly drain.

pub fn spawn_task(self) -> Result<(LogglyDrain, FlushHandle), Error>[src]

Spawn a task within the current executor context. The task will be responsible for sending all log messages.

pub fn spawn_thread(self) -> Result<(LogglyDrain, FlushHandle), Error>[src]

Spawn a thread responsible for sending all log messages.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T