Fix for issue 248

If an exception object is not passed to `log_error`, ensure that `log_msg` is built anyway. Otherwise, there is no way to log at `Logger::ERROR` level.

Resolves #248