I have tried with log4j.appender.file.File=logs/app_logs%d{yyyy-mm-dd}.log but file is getting generated with "app_logs%d{yyyy-mm-dd}.log" name. TimeStamp is not getting added.
Also tried with log4j.appender.FileNamePattern=logs/application_%d{yyyy-MM-dd}.log as well.
Any suggestion would be really appreciated.
log4j.rootLogger=INFO, file, stdout
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=logs/app_logs.log =====\>\> Need to updated this.
log4j.appender.file.MaxFileSize=10KB
log4j.appender.file.Append=true
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout.ConversionPattern=\[%3p\] %d \[%t\] %c %x - %m%n
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=\[%-p\] %d \[%t\] %c %x - %m%n
Maven dependecy:
log4j.properties:
log file: