Semantic Logging in Rails and Beyond

this Topic will be presented by DocLabyrinth

at March Meetup 2016, hosted by Tobias Pfeiffer

It's never easy to manage the vast flood of logs that come from a production web application. Tools like Logstash or Graylog offer a way to turn your logs back into useful, searchable data. When I first heard about these tools I wanted to start using them straight away, but there's a catch. Logstash offers powerful regular expressions to help you extract the useful information from your logs, but in practice I found this technique turned into a nightmare very quickly.

Semantic logging means choosing a format that's easy for another program to parse (and hopefully human-readable too); these logs are easy to feed into Logstash or other tools. There's another catch: every library, gem, project, code snippet that logs information has its own format already. Is it possible to take control of this flood of information, get everything into a search engine and never again have to use the humble grep command to search your logs?

Using a bit of Ruby magic I believe it's possible and even fairly simple to implement. In this talk I explain the problems I faced and why I think you should consider adopting semantic logging in your project as well.

4 People like it

Fork me on GitHub!
Become a patron