-1

I want a log file to be created with the file name and current system date using log4j. Can you guys please help me with log4j.properties code for this please?

1 Answers1

0

Maybe one of the existing questions will answer to yours ...

Setting a log file name to include current date in Log4j

Filename with date in Log4j

Create log file with date using log4j

Log file name to include current date in log4j

Community
  • 1
  • 1
Dams
  • 997
  • 12
  • 28
  • I want a code with working log4j.properties code. But the examples are with the code added to context.xml – Santhosh CJ Jun 30 '15 at 05:54
  • Properties for log4j can be defined by a properties file or by an XML file. both have advantage an inconvenient. but properties are same. You can use log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender http://stackoverflow.com/q/18719902/1811730 – Dams Jun 30 '15 at 06:05