feat: add SLF4J logging to all service classes - #110
Conversation
a52b2e4 to
00b0773
Compare
4208373 to
9a726a7
Compare
Add SLF4J loggers to CollectionService, IndexingService, SchemaService, SearchService, and JsonUtils. Log exceptions in all catch blocks instead of silently swallowing them. Use appropriate log levels: error for operational failures, warn for recoverable issues, debug for expected conditions (Solr 10 metrics unavailability, individual doc failures). Safe for STDIO mode: logback-spring.xml already suppresses console logging in the stdio profile. Closes #1 Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
9a726a7 to
1464f56
Compare
|
Rebased onto
Net effect is unchanged from the original intent — loggers on the five service classes, exceptions logged rather than silently swallowed — with none of #113/#176 undone. Verified: |
Adopts the narrowing from apache#111 so the two PRs compose instead of colliding. Both PRs rewrite the same two catch clauses in fetchCacheMetrics and fetchHandlerMetrics. apache#111 narrows RuntimeException to SolrException; this PR was binding the exception for logging while leaving RuntimeException in place. Whichever merged second would either conflict or silently revert the other's intent — so this branch now carries the narrowed form too, and the end state is the same in either merge order. RemoteSolrException extends SolrException (verified against solrj 10.0.0), so the Solr 10 path where /admin/mbeans is gone still degrades to null rather than propagating. What no longer gets swallowed is unrelated RuntimeExceptions -- which is the point of apache#111, and is what the new debug logging is there to surface. Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
|
Adopted #111's narrowing (506f2bb) so these two PRs no longer collide. Both touch the same two catch clauses in This branch now carries the narrowed catch as well, so the end state is the same in either merge Verified: Worth noting the two changes reinforce each other: narrowing the catch means unrelated runtime |
Summary
CollectionService,IndexingService,SchemaService,SearchService, andJsonUtilserrorfor operational failures,warnfor recoverable issues,debugfor expected conditions (Solr 10 metrics unavailability, individual doc failures)Test plan
./gradlew buildpasses./gradlew nativeTest -Pnativepasses (119/119 tests)🤖 Generated with Claude Code