Add support for logging severity

please review @r0mant @jeremyschlatter @anton-efimenko 
@jeremyschlatter good point!