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.
recordError
or something else? – Clover