logging - how to change log4cplus log file to utf8 -


i have been handed code uses log4cplus logger application. how can generate utf8 logging file it?. logfile being created log4cplus in ascii format @ moment.

i have tried follow

setting file encoding of log file following instructions @ change file encoding utf-8 via vim in script

vi datalog.txt :set bomb :set fileencoding=utf-8 :wq 

i have tried changing .properties file

log4cplus.logger.dl=trace,data  log4cplus.appender.data=log4cplus::rollingfileappender log4cplus.appender.data.locale=en-us log4cplus.appender.data.file=/usr/vm/log/data/datalog.txt log4cplus.appender.data.maxfilesize=5000kb log4cplus.appender.data.maxbackupindex=5 log4cplus.appender.data.layout=log4cplus::patternlayout log4cplus.appender.data.layout.conversionpattern=%d{%d/%b/%y %h:%m:%s.%q} %-9c %-5p %m%n 

i not sure on exact version of log4cplus locate resulted in following

/usr/lib/liblog4cplus-1.0.so.4 /usr/lib/liblog4cplus-1.0.so.4.0.0 /usr/lib/liblog4cplus-1.0.so.4.0.0_load /usr/lib/liblog4cplus.so 

since log4cplus 1.1.0-rc10 can specify locale imbued std::filestream used file appenders. see fileappender documentation, locale property. in case, try imbue en_us.utf-8.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -