make logging configureable like pantomjs does

this prevents annoying warnings like
QFont::setPixelSize: Pixel size <= 0 (0)
see here: https://github.com/ariya/phantomjs/commit/48027a3f01