From 3bb50d9f47657477158037ef5a1d7937554b26a8 Mon Sep 17 00:00:00 2001 From: Ruslan Iushchenko Date: Wed, 28 Jan 2026 15:53:44 +0100 Subject: [PATCH] #816 Fix the reliance on log4j libraries in the classpath `FileStreamer` by switching logging to slf4j interfaces. --- .../cobrix/spark/cobol/source/streaming/FileStreamer.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/FileStreamer.scala b/spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/FileStreamer.scala index acf786d4..6f6e39a0 100644 --- a/spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/FileStreamer.scala +++ b/spark-cobol/src/main/scala/za/co/absa/cobrix/spark/cobol/source/streaming/FileStreamer.scala @@ -17,8 +17,8 @@ package za.co.absa.cobrix.spark.cobol.source.streaming import org.apache.hadoop.conf.Configuration +import org.slf4j.{Logger, LoggerFactory} import org.apache.hadoop.fs.{ContentSummary, Path} -import org.apache.log4j.Logger import za.co.absa.cobrix.cobol.reader.common.Constants import za.co.absa.cobrix.cobol.reader.stream.SimpleStream import za.co.absa.cobrix.spark.cobol.utils.FileUtils @@ -39,7 +39,7 @@ import java.io.IOException */ class FileStreamer(filePath: String, hadoopConfig: Configuration, startOffset: Long = 0L, maximumBytes: Long = 0L) extends SimpleStream { - private val logger = Logger.getLogger(FileStreamer.this.getClass) + private val logger: Logger = LoggerFactory.getLogger(this.getClass) private val hadoopPath = new Path(filePath) private var byteIndex = startOffset