Add support for logging severity

please review @r0mant @jeremyschlatter @anton-efimenko 
Yep, it looks like this function should `return s.get() >= val`.