1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Rust log-compatible pretty/ndjson logger, based on femme
//!
//! ## Examples
//! ```
//! minifemme::start(minifemme::LevelFilter::Info, minifemme::LogMode::Pretty);
//! log::warn!("Unauthorized access attempt on /login");
//! log::info!("Listening on port 8080");
//! ```
pub use LevelFilter;
/// Selects between ndjson-based logging or pretty-printed
/// logging.
/// Starts logging with a log level and log mode.
/// All messages under the specified log level will statically be filtered out.
/// The logger will use the mode specified. This can't be changed later.
/// (Except if the program is running in a WASM environment.)
///
/// ```
/// minifemme::start(minifemme::LevelFilter::Info, minifemme::LogMode::Pretty);
/// log::warn!("Unauthorized access attempt on /login");
/// log::info!("Listening on port 8080");
/// ```