6 releases
0.3.4 | Jun 26, 2024 |
---|---|
0.3.3 | Jun 26, 2024 |
0.3.1 | Oct 15, 2023 |
0.2.3 | Jul 25, 2023 |
0.2.2 | Apr 20, 2023 |
#1422 in Rust patterns
66KB
1.5K
SLoC
sod-log
sod::Service
logging implementations via log
.
Service Impls
LogDebugService
logsDebug
input at a configured log level tolog::log
, returning the input as output.LogDisplayService
logsDisplay
input at a configured log level tolog::log
, returning the input as output.
Use Case
These Service
impls are most useful for logging an event as it passes through a service chain.
Example
use sod::Service;
use sod_log::LogDisplayService;
let logging_service = LogDisplayService::info("my event: ");
logging_service.process("hello world!").unwrap();
lib.rs
:
sod::Service
logging implementations via log
.
Service Impls
LogDebugService
logsDebug
input at a configured log level tolog::log
, returning the input as output.LogDisplayService
logsDisplay
input at a configured log level tolog::log
, returning the input as output.
Use Case
These Service
impls are most useful for logging an event as it passes through a service chain.
Example
use sod::Service;
use sod_log::LogDisplayService;
let logging_service = LogDisplayService::info("my event: ");
logging_service.process("hello world!").unwrap();
Dependencies
~270–760KB
~18K SLoC