0

I'm playing with spark in ipython notebook and having a blast, but unfortunately a recent change (maybe a recent spark upgrade) caused spark logging to the notebook rather than the console where I started the notebook. I still want to see these log messages so I can't just turn off logging, but I would prefer it be directed to console rather than logging to the notebook. Any way to achieve this?

JnBrymn
  • 24,245
  • 28
  • 105
  • 147

1 Answers1

0

Edit your conf/log4j.properties file and Change the following line:

   log4j.rootCategory=INFO, console

to

    log4j.rootCategory=ERROR, console

Another approach would be to :

Fireup spark-shell and type in the following:

import org.apache.log4j.Logger
import org.apache.log4j.Level

Logger.getLogger("org").setLevel(Level.OFF)
Logger.getLogger("akka").setLevel(Level.OFF)

You won't see any logs after that.

(copied from https://stackoverflow.com/a/1323999/348056)

Community
  • 1
  • 1
JnBrymn
  • 24,245
  • 28
  • 105
  • 147