Crate udp_logger_rs

Source
Expand description

This crate provides logging macros that incorporates key/value logging and a logger that sends all logs to a UDP port.

§Examples

use std::vec::Vec;
use udp_logger_rs::info;

let ctx: Vec<(String, String)> = vec![
  ("cat_1".into(), "chashu".into()),
  ("cat_2".into(), "nori".into()),
];

info!(kvs: &ctx, "something to log");

Macros§

debug
Logs a message at the debug level.
error
Logs a message at the error level.
info
Logs a message at the info level.
log
The standard logging macro.
log_enabled
Determines if a message logged at the specified level in that module will be logged.
trace
Logs a message at the trace level.
warn
Logs a message at the warn level.

Structs§

UdpLogger
The UdpLogger is a control structure for logging via UDP packets.

Enums§

Level
An enum representing the available verbosity levels of the logger.
LevelFilter
An enum representing the available verbosity level filters of the logger.
WireFmt
Wire formats. Default is Uncompressed.

Constants§

STATIC_MAX_LEVEL
The statically resolved maximum log level.

Functions§

max_level
Returns the current maximum log level.