using System; using Pegasus.Log4Net; using Pegasus.Log4Net.Appender; using Pegasus.Log4Net.Core; using Pegasus.Log4Net.Layout; namespace Pegasus.ServiceProcess { /// <summary> /// Internal Pegasus Class /// </summary> internal class ServiceApplicationAppender : AppenderSkeleton { // Local Instance Values private FormServiceApplication m_serviceApplication; // Public Const Values public const string NAME = "ServiceApplicationAppenderDebugMode"; /// <summary> /// Initializes a new instance of the <see cref="ServiceApplicationAppender"/> class. /// </summary> /// <remarks>Empty default constructor</remarks> internal ServiceApplicationAppender( FormServiceApplication serviceApplication ) { m_serviceApplication = serviceApplication; // Set the name of the appender Name = NAME; // Set the default layout for this appender. Layout = new SimpleLayout(); } /// <summary> /// Called to perform actual logging of the event. /// </summary> /// <param name="loggingEvent">The event to append.</param> protected override void Append( LoggingEvent loggingEvent ) { string text = RenderLoggingEvent( loggingEvent ); m_serviceApplication.WriteText( text ); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)