Suffering in silence, you check the logs for fresh telemetry.
You think: That can’t be right.
– Blindsight, Peter Watts
Blindsight is “observability through logging” where observability is defined as baked in high cardinality structured data with field types. The name is taken from Peter Watts’ excellent first contact novel, Blindsight.
Blindsight is a logging library written in Scala that wraps SLF4J to add useful features that solve several outstanding problems with logging:
- Expressing domain specific objects as arguments through type classes.
- Rendering structured logs in multiple formats through a format-independent AST and DSL.
- Enabling rich structured data through JSON-LD.
- Resolving operation-specific loggers through logger resolvers.
- Building up complex logging statements through fluent logging.
- Enforcing user supplied type constraints through semantic logging.
- Minimal-overhead tracing and causality tracking through flow logging.
- Providing thread-safe context to logs through context aware logging.
- Time-based and targeted diagnostic logging through conditional logging.
- Runtime method or line based logging overrides through scripting.
The only hard dependency is the SLF4J API, but the DSL functionality is only implemented for Logback with logstash-logback-encoder.
Please see the Setup page for artifacts and installation.
You can check out a “starter project” at https://github.com/tersesystems/blindsight-starter.
Blindsight is a pure SLF4J wrapper: it delegates all logging through to the SLF4J API and does not configure or manage the SLF4J implementation at all.
Versions are published for Scala 2.11, 2.12, 2.13, and 3.0.