AbsaOSS / AbsaOSS/enceladus

Use slf4j instead of log4j everywhere in the project

未關閉
#802 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
feature priority: low refactoring
主要語言
Scala
星號
33
分支
16
PR 合併指標
30 天內沒有已合併 PR

描述

## Background
Reported by @GeorgiChochov.

Slf4j is an abstraction layer for logging and exact implementation to use is determined at deployment time. Currently, Spark is our root project dependency and it uses log4j implementation. Rather than depending on a concrete logging backend, it is a good practice to make modules depend on interfaces provided by slf4j. In our case, the logging backend is provided by Spark. So another reason to use slf4j.

## Feature
Use slf4j instead of log4j everywhere in the project. Especially everywhere we have Spark dependency.

## Proposed Solution [Optional]
Basically,

replace

```scala
import org.apache.log4j.LogManager

private val log = LogManager.getLogger(this.getClass)
```

with

```scala
import org.slf4j.{Logger, LoggerFactory}

private val log: Logger = LoggerFactory.getLogger(this.getClass)
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。