Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nanolog probably have a problem with char array #12

Open
BTNC opened this issue Nov 27, 2016 · 1 comment
Open

nanolog probably have a problem with char array #12

BTNC opened this issue Nov 27, 2016 · 1 comment

Comments

@BTNC
Copy link

BTNC commented Nov 27, 2016

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
Copy link

#22
I meet same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants