I do have db appender and know how to get the output to a custom "logging" page ... The idea is to have a quick and dirty switch to write for example to the Response object ...
views:
611answers:
1
+2
A:
This really sounds like a dirty hack but you could get away with it using a MemoryAppender. Here's some sample code on how to get to the log data:
var memoryAppender = (MemoryAppender)LogManager.GetRepository()
.GetAppenders().Single(x => x.Name == appenderName);
var events = memoryAppender.GetEvents();
After picking the latest events from the appender for rendering you should probably do a
memoryAppender.Clear();
Peter Lillevold
2009-05-07 08:58:15