Added support for wide character in logging