This project has moved. For the latest updates, please go here.

Process existing file rows not just newly added ones?

Mar 6, 2009 at 6:07 PM
Is it possible to have Log2Console parse a file from the beginning not just the newly added rows?  I think that the tool is great and it will be useful for trapping existing errors but ones that have already occurred are very important also and I don't intend to keep this tool running constantly.  I am using the FileReceiver in this instance.

Thanks,
Ed
Developer
Mar 6, 2009 at 6:31 PM
I have  been discussing with a collegue the possibility of adding a facility so that when you are using the File Receiver that you can import previous log entries.  The question is which ones to import?  From the beginning of the log file could be a huge number of entries.  Should we ask for a time period?  What if you are using a rolling log appender and the entries are in another file?  Should we limit the import based on the log type.  i.e. Only import ERRORS from the last 24 hours.

Any thoughts?

Darrel


Apr 9, 2009 at 8:27 PM
There are certainly complications with parsing existing log files vs. simply reading new entries in the log.  One implementation could be that the FileReceiver has the option to display existing entries at which point you could provide a starting date/time.  Maybe a better option would be to enable a starting point option on the console window that allows you to set the date/time to begin displaying entries.  As for the issue around rolling log files...that is more difficult as there are many options available.  I think one way to deal with that would be to just add another file receiver and then the display options I suggested would work from there.  Probably a better but more sophisticated option would be to have a way in the Receivers settings to enable the FileReceiver to read rolling log files...the problem being that you want to make sure you are loading the correct rolled logs.  Maybe a file pattern would work to properly ID the rolled logs?

Thanks for this great tool and listening to my suggestion.

Ed
Aug 27, 2009 at 7:26 AM

I say just add a way to open a log.  I output RollingLogFile Appender logs on my client app..  my clients send me these logs for debugging purposes..  Would be nice to just be able to open the log in log to console..