Add support for log levels.

Shouldn't the callback be optional? What's the possible good strategy to recover from a logging error? I guess user will likely want to fire and forget.