Home > other >  The spark how output to the log file?
The spark how output to the log file?

Time:10-01

In the process of the running of the spark, printed in the console can information saved to the log in? Information about how to set the log4j? Seek guidance

CodePudding user response:

You can modify the conf directory log4j. The properties file:
Log4j rootCategory=STDOUT, DEBUG, INFO, the console, the FILE

Log4j. Appender. The FILE=org. Apache. Log4j. FileAppender
. Log4j appenders. FILE. The FILE=/home/hadoop/software/spark - 1.1.0 - bin - hadoop2.4/logs/FILE. The log
. Log4j appenders. FILE. Append=true
. Log4j appenders. FILE. Threshold=DEBUG
Log4j. Appender. FILE. Layout=org.. Apache log4j. PatternLayout
Log4j. Appender. FILE. Layout. ConversionPattern - d=% {MM - dd yyyy - HH: MM: ss} [% t: % r] - [p] % % m % n

CodePudding user response:

Ok thank you I try
  • Related