Log Management

With an increasing number of Applications, logging becomes more and more important. With just a few apps, that you are really in tune with, that you presently know in and out, it isn't too hard fixing a bug with a small description.

However as you codebase grows, you simply will forget and thus it is extremely helpful to have detailed log messages.

Now you could write your stuff to a file, which works fine for analysing the cause of an error after you have been notified of the error. However a lot of the time, once a user reports an error, there have been multiple exceptions been thrown before he even noticed that something was wrong.

Now reading through all those log files is simply impossible and thus we use a central logging solution like Graylog. Graylog is a battle tested tool that takes in log messages via tcp or udp and indexes them. This way it can handle enormous amounts of log messages, which you can then sort through and even set triggers to lets say all log messages that have an level of "Error".

You can find a Kubernetes deployment of Graylog here.

I have also written some libraries that can write to an Gelf UDP input. You can add an Input in your Graylog Webinterface at System/Inputs.

If you use NGINX to serve your pages, you can directly pump any access logs into Graylog, making traffic for your sites easy to analyse. You can find the relevant repo here.

Tobias Hübner