Add support for logging severity

please review @r0mant @jeremyschlatter @anton-efimenko 
Weird, looks like my comment didn't show up inline last time. This is the extra newline I was referring to.