Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/325#discussion_r11473388
--- Diff: core/src/main/scala/org/apache/spark/Logging.scala ---
@@ -135,4 +136,6 @@ trait Logging {
private object Logging {
@volatile private var initialized = false
val initLock = new Object()
+ // SLF4JBridgeHandler.removeHandlersForRootLogger()
--- End diff --
For static methods it looks like this:
```
try {
// We use reflection here to handle the case where users remove the
// slf4j-to-jul bridge order to route their logs to JUL.
val bridgeClass = Class.forName("org.slf4j.bridge.SLF4JBridgeHandler")
bridgeClass.getMethod("removeHandlersForRootLogger").invoke(null)
val installed =
bridgeClass.getMethod("isInstalled").invoke(null).asInstanceOf[Boolean]
if (!installed) {
bridgeClass.getMethod("install").invoke(null)
}
} catch {
case e: Exception => // can't log anything yet so just fail silently
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---