Skip to content

Commit 8a689e1

Browse files
committed
chore(exit-info): reduce the level of warnings possibly emitted by the exit-info plugin
1 parent 8061f30 commit 8a689e1

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
* Bumped the `minSdk` to 16 (Android 4.1 Jelly Bean), and removed redundant `minSdk` checks in the codebase
88
[#2212](https://github.com/bugsnag/bugsnag-android/pull/2212)
99

10+
### Enhancements
11+
12+
* Reduced the number of warnings emitted by `bugsnag-plugin-android-exitinfo` to reduce the noise in debug builds
13+
[#2221](https://github.com/bugsnag/bugsnag-android/pull/2221)
14+
1015
### Bug fixes
1116

1217
* Synthesised ANR errors from `bugsnag-plugin-android-exitinfo` will now report the correct device-id

bugsnag-plugin-android-exitinfo/src/main/java/com/bugsnag/android/ExitInfoPluginStore.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ internal class ExitInfoPluginStore(config: ImmutableConfig) {
6060
}
6161
}
6262
} catch (exc: Throwable) {
63-
logger.w("Unexpectedly failed to persist PID.", exc)
63+
logger.d(
64+
"Unexpectedly failed to persist PID, historical exit reasons may " +
65+
"not be matchable if this process crashes.",
66+
exc
67+
)
6468
}
6569
}
6670
}
@@ -91,12 +95,10 @@ internal class ExitInfoPluginStore(config: ImmutableConfig) {
9195
try {
9296
val content = file.readText()
9397
if (content.isEmpty()) {
94-
logger.w("PID is empty")
9598
return null
9699
}
97100
return content.toIntOrNull()
98101
} catch (exc: Throwable) {
99-
logger.w("Unexpectedly failed to load PID.", exc)
100102
return null
101103
}
102104
}

0 commit comments

Comments
 (0)