Skip to content

Conversation

@yruslan
Copy link
Collaborator

@yruslan yruslan commented Jan 28, 2026

Closes #816

Summary by CodeRabbit

  • Chores
    • Updated internal logging infrastructure for improved compatibility and maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

…er` by switching logging to slf4j interfaces.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

Replaces direct Apache Log4j Logger usage with SLF4J LoggerFactory in FileStreamer.scala. This updates the logging backend to support multiple logging implementations and resolves compatibility issues with certain logging configurations.

Changes

Cohort / File(s) Summary
Logging backend migration
spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/FileStreamer.scala
Switched from Apache Log4j Logger.getLogger() to SLF4J LoggerFactory.getLogger(); updated imports to use SLF4J for broader logging mechanism support

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through logs so bright,
From Log4j's way to SLF4J's light,
No more crashes in the night,
Better backends, oh what a sight! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: switching FileStreamer logging from Log4j to SLF4J to fix a runtime dependency issue.
Linked Issues check ✅ Passed The pull request directly addresses issue #816 by replacing Log4j Logger with SLF4J LoggerFactory in FileStreamer, removing the direct dependency on Log4j APIs that caused the NoSuchMethodError.
Out of Scope Changes check ✅ Passed All changes are focused on replacing the logging mechanism in FileStreamer as required; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

JaCoCo code coverage report - 'cobol-parser'

Overall Project 91.62% 🍏

There is no coverage information present for the Files changed

@github-actions
Copy link

JaCoCo code coverage report - 'spark-cobol'

Overall Project 81.96% 🍏
Files changed 100% 🍏

File Coverage
FileStreamer.scala 99.07% 🍏

@yruslan yruslan merged commit 7ace746 into master Jan 28, 2026
6 checks passed
@yruslan yruslan deleted the bugfix/816-fix-reliance-on-log4j branch January 28, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cobrix crashes with exception when logging is not done via Log4j

2 participants