4 releases

0.3.1 Oct 15, 2023
0.2.3 Jul 25, 2023
0.2.2 Apr 20, 2023
0.2.1 Apr 20, 2023

#2605 in Rust patterns

Download history 6/week @ 2024-02-23 5/week @ 2024-03-01 6/week @ 2024-03-08 9/week @ 2024-03-15 135/week @ 2024-03-22 3/week @ 2024-03-29

139 downloads per month

MIT/Apache

12KB
163 lines

sod-log

sod::Service logging implementations via log.

Service Impls

  • LogDebugService logs Debug input at a configured log level to log::log, returning the input as output.
  • LogDisplayService logs Display input at a configured log level to log::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

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

~0.4–1MB
~21K SLoC