Module log

Source
Expand description

Logging utils. See “log” crate documentation for details

Example:

use log::{info, LevelFilter};
use tarantool::log::{TarantoolLogger, SayLevel};

static LOGGER: TarantoolLogger = TarantoolLogger::new();
log::set_logger(&LOGGER).unwrap();
log::set_max_level(LevelFilter::Debug);
info!("Hello {}", username);

// Or you can write to Tarantool logger directly
tarantool::say_verbose!("Logging some messages...");
tarantool::say_info!("Hello world");
tarantool::say_warn!("Watch out!");

See also:

Structs§

TarantoolLogger
Log trait implementation. Wraps say().

Enums§

SayLevel
Tarantool-native logging levels (use it with say())

Functions§

current_level
Get current level of the default tarantool logger.
say
Format and print a message to the Tarantool log file.
say_format_args
set_current_level
Set current level of the default tarantool logger.