The RollingFileAppender does not support naming the file using todays date.

You should download and use an alternate appender, such as...

*  TimedRollingFileAppender, see
http://www.nabble.com/contribution%3A-TimedRollingFileAppender-td21076298.html
* DatedFileAppender, see http://logging.apache.org/catalog.html

manish_goyal wrote:
> 
> Hi,
> 
> I am using RollingfileAppender for logging data into file in
> log4j.properties file.
> I want to add current system date with file name.
> I have tried adding using System.currentTimeMillis(). but it's not
> working.
> 
> log4j.appender.searchLogger.file=Search_${System.currentTimeMillis()}.log
> 
> There is options to getting user.timezone(system properties). Any idea
> about system properties that give current dateTime?
> 
> Can any one please give some pointer to this.
> 
> Thanks.
> 
> Regards,
> Manish
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-add-current-date-with-file-name-for-RollingFileAppender-tp21028085p21088410.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to