Encoding issue fix

When I use this configuration to log messages in Russian I have encoding issues. This fix will help to improve logging module with multilanguage support.