taken from inconshreveable/log15 - generate key value pairs