The implementation of the RollingFileAppender uses the IDateTime interface to get the current datetime. You can mock that interface. On 2017-09-13 14:20, EbenZhang wrote:
> Github user EbenZhang commented on the issue: > > https://github.com/apache/logging-log4net/pull/13 > > >What about rolling by date in combination with subdirectories? What if the file should be rolled by date and be placed in a subdirectory that contains the rolling date? > > Is there a simple way to mock the date in unit test? > > > > ---
NEW: Monitor These Apps!
Apache Lucene, Apache Solr and all other Apache Software Foundation project and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext