fix(logging): don't unconditionally log to console
As part of https://github.com/getsentry/sentry-cocoa/pull/4103 I made it so that the console logging was optional and is compiled out by default. But, there was already another line of code that would unconditionally log to stdout if any crash logging was enabled. Remove that.
Also, clean up some of the log level strings with extra space, and don't worry about printing PRETTY_FUNCTION. It just takes up extra space, which is limited. Filename/lineno are enough.
#skip-changelog
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.355%. Comparing base (
2df93b0) to head (b4f34d4). Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4136 +/- ##
=============================================
- Coverage 91.391% 91.355% -0.036%
=============================================
Files 605 606 +1
Lines 48268 48345 +77
Branches 17411 17453 +42
=============================================
+ Hits 44113 44166 +53
- Misses 4061 4086 +25
+ Partials 94 93 -1
| Files | Coverage Δ | |
|---|---|---|
| Sources/Sentry/SentryAsyncSafeLog.c | 100.000% <100.000%> (ø) |
|
| Sources/Sentry/SentryAsyncSafeLog.h | 84.615% <100.000%> (ø) |
... and 19 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2df93b0...b4f34d4. Read the comment docs.
Performance metrics :rocket:
| Plain | With Sentry | Diff | |
|---|---|---|---|
| Startup time | 1235.85 ms | 1249.37 ms | 13.52 ms |
| Size | 21.58 KiB | 681.75 KiB | 660.16 KiB |
Baseline results on branch: main
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7e757f454a638bb8a2510e6b336f9a740613accd | 1229.31 ms | 1252.00 ms | 22.69 ms |
| b8dd0fcbc9928e401ca6f85ec9ff4913f21f0e61 | 1268.96 ms | 1271.90 ms | 2.94 ms |
| 60dd0f5656d961f9a9d604ceaf8dd5d99efd393d | 1239.94 ms | 1252.54 ms | 12.60 ms |
| 257c2a998df2f9a0e257802d69d4268d4a83c560 | 1231.45 ms | 1252.12 ms | 20.67 ms |
| a5c946bb1a2453d604864443277424df99c2076d | 1219.33 ms | 1236.53 ms | 17.20 ms |
| ae9c51b0d6e71205648e9d44d9f4d61827ccd1e6 | 1247.33 ms | 1254.12 ms | 6.80 ms |
| 8aec30ebd6b60262f8b935b5475741c92da38834 | 1249.29 ms | 1252.63 ms | 3.35 ms |
| 297f4604214bd658bd0a752adfcbbd2e41bd85e2 | 1234.81 ms | 1255.27 ms | 20.45 ms |
| 438e21a0191e5a88b109b3663d770bfd1ef51d56 | 1237.47 ms | 1255.24 ms | 17.77 ms |
| de033daa1cfa7690b0644ba9292b69259d386266 | 1206.55 ms | 1217.08 ms | 10.53 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7e757f454a638bb8a2510e6b336f9a740613accd | 21.58 KiB | 682.40 KiB | 660.82 KiB |
| b8dd0fcbc9928e401ca6f85ec9ff4913f21f0e61 | 20.76 KiB | 401.39 KiB | 380.63 KiB |
| 60dd0f5656d961f9a9d604ceaf8dd5d99efd393d | 20.76 KiB | 393.36 KiB | 372.60 KiB |
| 257c2a998df2f9a0e257802d69d4268d4a83c560 | 20.76 KiB | 401.36 KiB | 380.60 KiB |
| a5c946bb1a2453d604864443277424df99c2076d | 20.76 KiB | 431.93 KiB | 411.17 KiB |
| ae9c51b0d6e71205648e9d44d9f4d61827ccd1e6 | 22.85 KiB | 411.13 KiB | 388.28 KiB |
| 8aec30ebd6b60262f8b935b5475741c92da38834 | 21.58 KiB | 616.76 KiB | 595.18 KiB |
| 297f4604214bd658bd0a752adfcbbd2e41bd85e2 | 21.58 KiB | 629.83 KiB | 608.24 KiB |
| 438e21a0191e5a88b109b3663d770bfd1ef51d56 | 20.76 KiB | 434.62 KiB | 413.86 KiB |
| de033daa1cfa7690b0644ba9292b69259d386266 | 21.58 KiB | 418.15 KiB | 396.57 KiB |
Previous results on branch: armcknight/ref/crashlogger-repurpose/8-fix-double-console-print
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9ecedc018eb1b6ac4426ced71f2f20633ed410b0 | 1221.78 ms | 1240.21 ms | 18.44 ms |
| 3103f63984da6c77cfa79e6c6488a6b3daf33f9d | 1221.31 ms | 1238.44 ms | 17.13 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 9ecedc018eb1b6ac4426ced71f2f20633ed410b0 | 21.58 KiB | 680.23 KiB | 658.65 KiB |
| 3103f63984da6c77cfa79e6c6488a6b3daf33f9d | 21.58 KiB | 679.92 KiB | 658.34 KiB |
Is there a Dif problem going on?
I remember seem some of this in #4101.
@brustolin it needed a merge from main, it's g2g now