Iyengar111 / NanoLog

Low Latency C++11 Logging Library
727 stars 186 forks source link

nanolog probably have a problem with char array #12

Open BTNC opened 8 years ago

BTNC commented 8 years ago

Hi,

I have to use an old library which returns me information as char arrays, for example char[9] to represent the time. All char arrays have trailing '\0', and the array space may not be fully used. For example , sometimes it returns char[9] with 9 '\0'. However when I log the char array using LOG_INFO<<time;, I get garbage log, especially for debug version. I temporarily walk around it by LOG_INFO<<std::string(time), so that I can get correct result for both debug and release versions, however this slows down the logger. Could you suggest what could be wrong?

Thanks,

edigar007 commented 7 years ago

22

I meet same problem.