logging: test log level at first step

Return from the logger immediately if message's log level is not
sufficient to write it to the log.

This patch is a workaround for rhbz#1122690 where we try to log a
'post'ed string which has 18MB of size. It is not worth to try to fix it
properly. We do not log such a big amount of data in non-debug mode, we
need to have the logging extremely fast and we can live with crashes in
debug mode.

Signed-off-by: Jakub Filak <jfilak@redhat.com>