Tired of geeks telling you to SSH into
server.prod.bigcoorp to read log files, tired of hipsters telling you to set up an Elasticsearch cluster to see some fancy dashboards?
Here comes lazy-tail - a library exposing the logs of any host application using Logback to the Web!
3 endpoints available
/logsto access the slick web frontend.
/logs/tailwith the optional HTTP param 'minLevel' to subscribe to the SSE stream of logs.
/logs/lastErrorsto retrieve the last ERROR logs kept in memory.
Start by creating an instance of the
LazyTail class - as an optional argument it takes the LoggerName you want to expose. (by default "ROOT")
then 2 alternatives are currently available on a
// starts an HTTP server on the provided port to expose logs. def start(port: Int): Unit // returns an Akka-http Route containing the lazy-tail logic. def route()(implicit system: ActorSystem): server.Route
lazy-tail depends on akka-http 1.0.
resolvers += "agourlay at bintray" at "http://dl.bintray.com/agourlay/maven" libraryDependencies ++= List( "com.github.agourlay" %% "lazy-tail" % "0.1.7", ... )
- retrieve/specify a log pattern for the display format of the log.
- statistics about errors (frequency by type, rate 1-5-15 ...)