Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1433 Logging Exceptions to Both Console and Exception Loggers #5396

Merged
merged 4 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ class AnalyticsController @Inject constructor(
.addEventLogsToUpload(eventLog)
.build()
} else {
// TODO(#1433): Refactoring for logging exceptions to both console and exception loggers.
val exception =
IllegalStateException("Least Recent Event index absent -- EventLogCacheStoreSize is 0")
consoleLogger.e("AnalyticsController", "Failure while caching event.", exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class PerformanceMetricsController @Inject constructor(
.addOppiaMetricLog(oppiaMetricLog)
.build()
} else {
// TODO(#1433): Refactoring for logging exceptions to both console and exception loggers.
val exception =
IllegalStateException(
"Least Recent Event index absent -- MetricLogStorageCacheSize is 0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ class ExceptionsController @Inject constructor(
.addExceptionLog(exceptionLog)
.build()
} else {
// TODO(#1433): Refactoring for logging exceptions to both console and exception loggers.
val exception =
NullPointerException(
"Least Recent Exception index absent -- ExceptionLogCacheStoreSize is 0"
)
consoleLogger.e(EXCEPTIONS_CONTROLLER, exception.toString())
exceptionLogger.logException(exception)
}
}
return@storeDataAsync oppiaExceptionLogs.toBuilder().addExceptionLog(exceptionLog).build()
Expand Down
Loading