[][src]Macro teloxide::enable_logging_with_filter

macro_rules! enable_logging_with_filter {
    ($filter:expr) => { ... };
}

Enables logging through pretty-env-logger with a custom filter for your program.

A logger will only print errors from teloxide and restrict logs from your program by the specified filter.

Example

Allow printing all logs from your program up to LevelFilter::Debug (i.e. do not print traces):

teloxide::enable_logging_with_filter!(log::LevelFilter::Debug);

Note

Calling this macro is not mandatory; you can setup if your own logger if you want.