c# - A good example of custom log4net appender outputting text directly to a asp.net control ( custom control , Label , etc)? -
I have a DB appender and know how to get output to a custom "logging" page ... this idea For example, there is a quick and dirty switch to write for Response Object ...
Actually a dirty hack seems to be, but you can remove it using memoryappender. Here's some sample code about how to get the log data:
var memoryAppender = (MemoryAppeak) LogManager.GetRepository () .GetAppenders (). Single (x = & gt; x.Name == appenderName); Var Events = MemoryEpender.gate events (); After selecting the latest events from the appendor, you should probably
memoryAppender.Clear ();
Comments
Post a Comment