Hi all-
I've been successful using log4net in a fairly conventional manner for a Windows Mobile 5.0 project (e.g., using XmlConfigurator with both an AdoNetAppender and a FileAppender). However, now I would like to use log4net to output filtered log messages to a startup screen with a TextBox control. The key issue here is that the startup screen is temporary--it will only be displayed for ~30 seconds while my application is loading. I was thinking of using something like a MemoryAppender, which could either be read by the startup screen class via a timer thread every 500 ms or extended with an event type that would fire every time a new log message was appended. I have two questions:
1. How would my startup screen class obtain a reference to the MemoryAppender such that it could read the logged events
2. After startup completes and I no longer need the MemoryAppender, is there a standard way of cleaning up or would I just call the "Close" method on the MemoryAppender reference. What are the consequences of removing an Appender during runtime?
Thanks in advance!
Jon
- Best Method For Temporary Appender Jon Froehlich
- RE: Best Method For Temporary Appender Nicko Cadell