1. Vladimir Shamray
  2. plog
  3. Issues
Issue #7 resolved

Write std::string with null terminators inside

andyy
created an issue

Code for reproducing issue:

std::string str = "hello";
str += '\0';
str += "this will not be logged";
LOG(plog::info) << str;

The same also applies to wstring

Comments (5)

  1. Vladimir Shamray repo owner

    All symbols with codes 0..31 (except for '\t', \'n' and '\r') will be replaced with '?' when being written into the log both for std::string and std::wstring.

    The same will have effect on const char* and const wchar_t*, but null characters will be still treated as string terminating characters.

    This will be implemented in 0.4.0

  2. Log in to comment