Refine log levels and log messages.