Grepping Docker Logs

May 4, 2018

Some of the things in docker logs are written to stdout and others to stderr. If you grep like this:

$ docker logs my-docker-container | grep "Thing that doesn't exist in the file"

The output will show any lines from the docker log that were written to stderr. This may be ...

Junit Toolbox

April 30, 2018

I wanted a way to easily run a subset of my unit tests. We already had categories on each test, and it is possible to limit which tests are run using junit-toolbox, details at

For each test we have one or more categories defined. Each ...

Logstash Grok

April 25, 2018

I'm using FileBeat and Logstash to load log files into Elasticsearch so that they are visible in Kibana. I was struggling with creating the correct grok message format to read the log entries in and make them available in Kibana.

The tool at was invaluable ...

Backup up Postgres Databases

April 22, 2018

I wanted to dump the contents of some postgres databases into files, complete with a date timestamp. I also wanted to gzip the files to save disk space.

This can be done with the following in the postgres user crontab file:

0 4 *** pg_dump databasename | gzip > /home/drumcoder/db/database- ...

XPath on w3c dom nodes

April 16, 2018

In one of my tests I wanted to parse some XML then use XPATH to find a particular node inside the XML. The code was parsing the XML into a org.dom.w3c.Document instance. I then needed to compare the text values of the nodes with expected values.

This ...