Created
May 7, 2015 13:27
-
-
Save nicolaferraro/b39df5eaeb939e87aa54 to your computer and use it in GitHub Desktop.
Streaming print
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setStreamingLogLevels() { | |
val log4jInitialized = Logger.getRootLogger.getAllAppenders.hasMoreElements | |
if (!log4jInitialized) { | |
// We first log something to initialize Spark's default logging, then we override the | |
// logging level. | |
logInfo("Setting log level to [WARN] for streaming example." + | |
" To override add a custom log4j.properties to the classpath.") | |
Logger.getRootLogger.setLevel(Level.WARN) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment