This project has moved and is read-only. For the latest updates, please go here.

Make FileReceiver show contents from beginning of file

Jan 25, 2010 at 2:54 PM


I was trying to do a log reader for my log4net files when I (thankfully) found this project.

The thing was that I needed to show the whole log file when attaching a file receiver, not just the new appended lines. So, I made some code changes that, if someone thinks may be useful, I can submit.

Again, thank you for this great project.



Jan 25, 2010 at 3:36 PM

This feature has been requested before.  Did you simply change the FileReceiver behaviour or did you create a new receiver?  The problem is that we need to have both behaviours.  We cannot just change the FileReceiver to always work this way or when someone opened Log2Console and there is a very large log file it would take a very long time to display.  

One solution that has been discussed is having a "From Date" parameter that could be changed to reload the log from an earlier time than when it was opened.

Jan 25, 2010 at 3:41 PM

I added a boolean setting to the FileReceiver indicating when an instance should behave this way, whith a default of false.


Jan 25, 2010 at 3:52 PM

Seems like a reasonable compromise.  Upload the patch and I'll merge it in.