Fabric/Crashlytics - Only first line of logged message is visible in issue detail
Asked Answered
M

0

6

I’m using Crashlytics crash and non-fatal bug reporting in my apps for some time now. I’m enhancing both reports with logs, as described here: https://docs.fabric.io/apple/crashlytics/enhanced-reports.html#custom-logging-in-swift

What I noticed recently is that if I try to log a message with a newline in it, all the text after the newline will be removed by the SDK and thus only the first line is visible on Crashlytics. As far as I remember, it used to not work this way. The whole message was visible and correctly formatted with newlines.

Example:

let logMsg = "This is a multiline \n message \n Hope all lines are visible in Crashlytics." 
CLSLogv("%@", getVaList([logMsg])) 

in Crashlytics, only this part will is logged:

1 | 13:13:00:928 (UTC) | This is a multiline

Is this a bug? Can I prevent the Crashlytics SDK from doing this? Right now, I’m missing some important parts of the logs.

Mandrill answered 28/2, 2018 at 13:31 Comment(6)
Mike from Fabric here and we're looking into this.Subdue
Hey @MikeBonnell, any update?Mandrill
We're still working on the fix, I'll update the thread when there is new news.Subdue
same problem hereNotch
I'm also running into this, and it's a fairly serious issue for me, as I'm wanting to log "invalid" JSON received in network responses, and the JSON will inherently be multiline. Is there some sort of workaround for logging multiline strings through recordError or something else?Clover
Any update on that? I'm using ResponseDetective Library where message is trimmed.Byzantium

© 2022 - 2024 — McMap. All rights reserved.