Struct slog_loggly::LogglyDrainBuilder
[−]
[src]
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]
self,
connector: HttpsConnector<HttpConnector>
) -> LogglyDrainBuilder
Use a given HttpsConnector. The connector is used only if the log message sender is spawned as a task.
pub fn spawn_task(
self,
handle: &Handle
) -> Result<(LogglyDrain, FlushHandle), Error>
[src]
self,
handle: &Handle
) -> Result<(LogglyDrain, FlushHandle), Error>
Spawn the log message sender as a separate task using a given handle and return the drain.
pub fn spawn_thread(self) -> (LogglyDrain, FlushHandle)
[src]
Spawn the log message sender as a separate thread and return the drain. You should not use this method in asynchronous applications.