Skip to content

Commit

Permalink
Fix SPARK-1413
Browse files Browse the repository at this point in the history
  • Loading branch information
witgo committed Apr 4, 2014
1 parent ee6e9e7 commit 70f3c64
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ private[sql] case class ParquetRelation(val path: String)

private[sql] object ParquetRelation {

var isEnableLogForwarding = false

def enableLogForwarding() {
// Note: Parquet does not use forwarding to parent loggers which
// is required for the JUL-SLF4J bridge to work. Also there is
// a default logger that appends to Console which needs to be
// reset.
if (isEnableLogForwarding) return
import org.slf4j.bridge.SLF4JBridgeHandler
import java.util.logging.Logger
import java.util.logging.LogManager
Expand All @@ -106,6 +109,7 @@ private[sql] object ParquetRelation {
logger.setParent(Logger.getGlobal)
logger.setUseParentHandlers(true)
}
isEnableLogForwarding = true
}

// The element type for the RDDs that this relation maps to.
Expand Down

0 comments on commit 70f3c64

Please sign in to comment.