I have Solved path issue of log4j.xml in mac :
in windows we configure log4j in web.xml like :
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>file:${LOG4J_HOME}/conf/log4j.xml</param-value>
<!-- Above path is that where we have stored log4j.xml file externally -->
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>6000</param-value>
</context-param>
Where ${LOG4J_HOME} is user varible we use to set in window. like
user variable = LOG4J_HOME
value = D:/LOG4J (in d drive we have created a folder of name Log4J we copied that path and gave as a value)
In mac we have envirenvirent variable set fasility by bash command, but it didint work anymore.
so for mac we have to create one folder any where and we have to give static path of that folder.
like in xml :
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>file:/Users/vardhaman/Desktop/LOG4J/conf/log4j.xml</param-value>
<!-- Above path is that where we have stored log4j.xml file externally to get this path go up to the log4j.xml file in external device and right click select get info, where we will get path, copy that path -->
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>6000</param-value>
</context-param>
Same way we have to do in log4j.xml file
In window we use to do like :
<appender name="CLICK-SPRING" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${LOG4J_HOME}/logs/CLICK/CLICK-spring.log"/>
<param name="Append" value="true"/>
<param name="Threshold" value="DEBUG"/>
<param name="MaxFileSize" value="100MB"/>
<param name="MaxBackupIndex" value="10" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %p [%t] %C{1}.%M(%L) | %m%n"/>
</layout>
</appender>
In mac :
in place of value we have to copy static path up to folder LOG4J, or you can create any folder.
<appender name="CLICK-SPRING" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="Users/vardhaman/Desktop/LOG4J/logs/CLICK/CLICK-spring.log"/>
<param name="Append" value="true"/>
<param name="Threshold" value="DEBUG"/>
<param name="MaxFileSize" value="100MB"/>
<param name="MaxBackupIndex" value="10" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %p [%t] %C{1}.%M(%L) | %m%n"/>
</layout>
</appender>