How to do JSON logging in Scala?

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

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Build time-series-based applications quickly and 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

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • 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.

    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