• 2014-02-03

    Docker and Logstash: Smarter Log Management For Your Containers

    Docker currently supports getting logs from a container that logs to stdout/stderr. Everything that the process running in the container writes to stdout or stderr docker will convert to json and store in a file on the host machine's disk which you can then retrieve with the docker logs command.

    This is handy but it has its drawbacks because you don't get any log rotation and the file size of the collected logs can become an issue as it eats up your host's disk space. Not to mention the fact that every time you run docker logs container_id you get all the logs of that processes from the beginning.

    While there are some interesting things being discussed on the docker-dev mailing list, I wanted to see if I could get docker to play along with proven logging systems out there with the functionality I have now.

    Read more…

    docker elasticsearch logs logstash

  • 2014-01-18

    Classes for all the things?

    Recently I've been thinking a lot about how to simplify my code. Now, the key thing to note here is that simple != familiar.

    Classes for example are familiar to most people. But code consisting exclusively of classes and OOP concepts isn't necessarily simple all of the time. The question arises: Is there something simpler?

    Well, the first thing that comes to mind, of course, good old functions. Functions are universal, everybody understand them, even new programmers that don't yet get all the fancy concepts about OOP get plain old functions.

    Keep in mind, I'm not saying that classes don't have their place in our code, but rather that maybe we don't need them quite as often as we might think.

    Read more…

    fp functional programming python