Expand description
Composable logging with monoids and contravariant functors.
A logger is a routine that takes input and has side-effects. Any routine that has the appropriate type will do. A logger can be seen as the opposite or dual of an infinite iterator.
The core trait of this crate is Logger. It has only a single method that must be implemented: log. To log something, pass it to this method. It is up to the logger to decide what to do with the value.
Loggers are composable: given two loggers with compatible types, a new logger can be created that forwards its input to both loggers.
Loggers can also be transformed using methods such as map and filter.
Structs§
- Chain
- Returned from the Logger::chain method.
- Empty
- Returned from the empty function.
- Extender
- Returned from the extender function.
- Filter
- Returned from the Logger::filter method.
- Map
- Returned from the Logger::map method.
- Safe
- Returned from the Logger::safe method.
Traits§
- Logger
- A logger is a routine that takes input and has side-effects.