Loading from Directory Should Recognize pattern *.xml* Because RollingFileAppenders in Log4Net always append a sequence


For example, files will look like:
I have not found a way to prevent this odd naming without modifying source code.
Would you be interested in making this change? Or having me make the change and commit?


hogayoga wrote Mar 11, 2010 at 9:38 PM

I've been working with your code a bit and although the UI says "Path to log file(s):" it is really looking for a specific log file. As such, I'd like to suggest that we add a "Path to directory" feature so that all of the files in the directory are loaded (and even watched).

sergeys wrote Mar 12, 2010 at 7:40 AM

Your request brings up more general problem: the support for rolling logs. This is a quite big feature and I am going to implement it in the next release. There is no ETA for it though.
I am going to implement the rolling support by treating the group of logs as a single file so that you won't have to open each log file separately. In this approach the viewer will automatically pick up new *.xml. files when viewing live logs.
Because of these plans I wouldn't like to make the changes you proposed in the source trunk. But you can easily make the change locally: open Apache-Log4j-xml.format.xml (or the file you have generated out your log4net config) and change the value of

sergeys wrote Mar 12, 2010 at 7:51 AM

Regarding "Path to directory" feature: currently you can choose multiple files at a time by selecting them all together in Open dialog. I think this feature covers your need to open multiple .xml. from the a directory. In the next release the native support for the rolling logs will be added so you won't have to open them all manually. Watching for the directory will be implemented as looking for new .xml. files in the directory.

hogayoga wrote Mar 12, 2010 at 4:27 PM

Thanks for the help. I changed the pattern and it certainly makes it easier to open multiple files. I am looking forward to the next release. Let me know if you'd like some help as I'm happy to contribute.