Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Semantic Logging in Akka Core #10

Open
rogeralsing opened this issue Jun 12, 2015 · 1 comment
Open

Semantic Logging in Akka Core #10

rogeralsing opened this issue Jun 12, 2015 · 1 comment

Comments

@rogeralsing
Copy link

The current logging infrastructure in Akka is based on logging strings.
Which works fine for oldschool loggers like NLog (on .NET that is)

But there are a lot of valuable information in those logs that is hard to get from a pure textual log.
For example, lets say you want to measure frequency of heartbeats, or how often some system is gated etc.
You would have to parse text output for that.

(I know you are also working on monitoring support which might make some of these things easier)

But if the logging infrastructure inside Akka core modules used semantic logging. we could extract much more useful information about the system.

e.g. Akka logs -> elastic search -> kibana dashboard.

I think that would be a very nice addition to any type of monitoring support.

We on the .NET side do support semantic logging via Serilog as a logging adapter. however, that requires other type of formats/templates for your actual log messages.
So it is absolutely possible to use semantic logging in user code of Akka.NET.

But inside the core modules, we still have the standard string formatted messages + LogEvent derivates that simply outputs its content via ToString()

Thoughts on this?

@wsargent
Copy link

wsargent commented Jun 4, 2018

The way that we've handled this in the past is to use the logstash-logback-encoder with JSON composite layout

https://github.com/logstash/logstash-logback-encoder#composite-encoderlayout

and then set up a context through use of LogstashMarkers that get dropped in as JSON attributes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants