tags:

views:

241

answers:

0

Hi I am new to log4j.xml which is used to log the information. Currently I am giving the absolute path in log4j.xml like

appender name="FA" class="org.apache.log4j.DailyRollingFileAppender"> param name="DatePattern" value="'_'yyyyMMdd"/> param name="File" value="D:/logFiles/GPreprocessor.log"/> layout class="com.dnb.genericpreprocessor.common.log.AppXMLLayout"/> /appender>

I do not want to give "GPreprocessor.log" directly.Actually that file name is dynamic based on my project. Suppose if I want to log for ABC.class interface the file should be D:/logFiles/ABC.log.

Please provide me with valuable inputs or codes. I have been seraching for this for a long.