JVM

Lyrelog for Java and Kotlin servers

The Android SDK's engine on your server, and a Logback appender: Spring Boot's logging sends to Lyrelog with no code, MDC and key-value pairs included.

fun main(args: Array<String>) {
    // a server key, lyr_srv_...
    Lyrelog.start(Configuration(System.getenv("LYRELOG_KEY")) {
        platform = "api"
    })
    // or embeddedServer(Netty, ...) in Ktor
    runApplication<OrdersApplication>(*args)
}

Version 1.0.0. Java 11 or later; Logback 1.3+ for the appender.

What it does on JVM

Start it and these come with it. Where the platform can't tell by itself, it's a call or a few lines, all in the guide.

  • A call or a few linesCrashes and uncaught errorscaptureUncaught = true, off by default
  • On its ownSessionsOne per process
  • A call or a few linesEnvironment, told apartLYRELOG_ENVIRONMENT, else production
  • On its ownEvents wait when offlineOn disk, 20 MB and 7 days; kept across restarts with storageDirectory
  • On its ownVerified eventsWith a server key
  • On its ownYour existing loggingA Logback appender (SLF4J); no Log4j 2 or java.util.logging

JVM, in practice

What the guide says to keep in mind on this platform.

  • A shutdown hook sends what's left on a normal exit; kill -9 skips it.
  • In coroutines and reactive code, pass the user per event: the scope is per thread.
  • A Spring request filter that records each request is in the guide.
  • The JVM guide

See it with your own app's events

Sign up with GitHub, Google or Apple. Your organization starts on Free; move it to Pro whenever you want.