Closed arietto closed 4 years ago
It sure is. By default, QDebug formats QString output enclosing it in quotes and escaping possibly unsafe characters (including the quotes, word wraps etc.). You can disable this just adding .noquote()
to your LOG_TRACE call, which returns QDebug object just like qDebug macro does.
LOG_TRACE().noquote() << "JSON:" << yourJsonVariable;
Thank you, sir!
Hello! I'd like to switch off escaping in my log. Is it possible? When I log JSON fragment via
LOG_TRACE()
to debug console, it contains ugly \" and \n elements. Is the problem linked with noquote?