How to do JSON logging in Scala?

This page summarizes the projects mentioned and recommended in the original post on /r/scala

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • echopraxia-plusscala

    Scala API for Echopraxia

  • So I hope the simplest way to do this is echopraxia-plusscala. (ObDisclaimer, I am author.)

  • echopraxia-scala-example

    Example project using echopraxia-plusscala

  • You should be able to run echopraxia-scala-example. There are a bunch of features, but you can ignore most of it and just use the features with the provided logstash-logback-encoder setup. Then a simple class with

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • woof

    A pure Scala 3 logging library with no reflection

  • If you're using Scala 3, Woof is a great logging library that can output to json

  • odin

    Fast & Functional logger in Scala (by valskalla)

  • scribe

    The fastest logging library in the world. Built from scratch in Scala and programmatically configurable. (by outr)

  • I believe Scribe also supports what you want.

  • logstash-logback-encoder

    Logback JSON encoder and appenders

  • We're using https://github.com/logfellow/logstash-logback-encoder with logback (on Play Framework, but should work fine on Lambda as well).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts