Add support for logging severity

please review @r0mant @jeremyschlatter @anton-efimenko 
Can you separate `. "gopkg.in/check.v1"` from the standard library imports while you're here?