Only log large invalid JSON strings when built in debug mode
This commit is contained in:
parent
d31d2387f3
commit
e22b748ce9
@ -109,8 +109,12 @@ int ModApiUtil::l_parse_json(lua_State *L)
|
||||
size_t jlen = strlen(jsonstr);
|
||||
if (jlen > 100) {
|
||||
errorstream << "Data (" << jlen
|
||||
#ifdef NDEBUG
|
||||
<< " bytes) not printed." << std::endl;
|
||||
#else
|
||||
<< " bytes) printed to warningstream." << std::endl;
|
||||
warningstream << "data: \"" << jsonstr << "\"" << std::endl;
|
||||
#endif
|
||||
} else {
|
||||
errorstream << "data: \"" << jsonstr << "\"" << std::endl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user