Closed NeverwinterMoon closed 5 years ago
Oh fun :) wasn't aware of this bug! Thanks for reporting 👍 will fix ASAP
@NeverwinterMoon Just occurred to me that this may not be a NSLogger issue. How are you logging your request ? If you are logging from ObjC, make sure you do NOT pass directly your request string because the % will be interpreted as formatting characters.
In Obj-C you want to log "%@", requestString
In Swift you want to log "(requestString)"
If already doing that, can you show the code line(s) logging the URL ?
@fpillet Oh, you might be onto something. I am actually using NSLogger
through XCGLogger
and have have been doing that for so long, I've forgotten I am using XCGlogger
at all...
NSLogger
is added as a destination to XCGlogger
this way:
LogMessageF_va(
logDetails.fileName,
Int32(logDetails.lineNumber),
logDetails.functionName,
domain,
Int32(convertLogLevel(logDetails.level)),
logDetails.message,
getVaList([])
)
Yes the problem is with the last two arguments. It should be doing:
LogMessageF_va(
logDetails.fileName,
Int32(logDetails.lineNumber),
logDetails.functionName,
domain,
Int32(convertLogLevel(logDetails.level)),
"%@",
getVaList([logDetails.message])
)
Otherwise the %
signs in your message are interpreted as formatting arguments
@fpillet Thank you so very much. It works nicely now!
Something like this:
https://foo.com/path?country=EE&returnUrl=https%253A%252F%252Fbar.com%252F%253Fcountry%253DEE
is displayed exactly like I posted above in Xcode or AppCode logs, but in NSLogger app it looks like: