Logs are an important part of maintaining business applications. To accomplish this, most developers leverage some means of structured logging, which effectively boils down to having a context of keys and values that are parseable by a log ingestor (e.g. datadog, splunk, etc.).
This library takes structured logging seriously, and offers it as a first class citizen. This library adheres to the following log-level definitions:
- ERROR: Unhandled errors / outcomes
- WARN: Handled errors / outcomes
- INFO: Informational, low-frequency logs (e.g. startup/shutdown logs)
- DEBUG: Informational, high-frequency logs (e.g. request logging)
- TRACE: Data / class bodies
Each offering leverages LogEncoder instances to structure the logs that you see. There are Show instances available to use out-of-the-box, which attempts to create a toString-like representation of the structures. That can be useful for most people, but if you are looking to introduce more searchability, using a JSON offering can be very beneficial. There are Circe modules for these instances that users can leverage for this purpose.