Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to override default log4j properties


How to override default log4j properties

present we are using hadoop.root.logger="INFO,console" for mapreduce ans spark jobs. I wanna override with "WARN,console" , I tried to set global variable export HADOOP_ROOT_LOGGER="WARN,console" in but its not working . i can see info,warn,error in yarn log. how can i override these settings.


Re: How to override default log4j properties

Super Mentor

@jayaprakash gadi

If you are using Ambari to start and stop your services then you should make changes via ambari "" instead, Else it will override your System level (global setting) while starting the process.

For spark executor you can also pass your own as well:


Re: How to override default log4j properties

New Contributor

hi i have a simple oozie shell action to echo "hell o world", I am trying to over ride the oozie shell action logging Please let me know how this can be achieved

I tried setting the map reduce properties of shell action still it does not work

I have a bash script like this




echo "log4j logger checking the target" # End of script tasks, returning error code

I added the following property in workflow and i tried to execute


the log4j content is similar to this

log4j.rootLogger=${hadoop.root.logger} hadoop.root.logger=INFO,oozie log4j.appender.oozie=org.apache.log4j.ConsoleAppender log4j.appender.oozie.layout=org.apache.log4j.PatternLayout log4j.appender.oozie.layout.ConversionPattern=[%p] %d{yyyy-MM-dd'T'HH:mm:ss.SSSZ} [sds-to-hdfs][%c] %m%n

I want to change the logging target to System.out just to check if the log4j is overirdden

But still the log4j is not overriden please let me know if there is smothing wrong

Don't have an account?
Coming from Hortonworks? Activate your account here