nicko       2005/06/15 09:26:41

  Modified:    examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender
                        AsyncAppender.cs FastDbAppender.cs
                        FireEventAppender.cs MessageBoxAppender.cs
                        MessageObjectExpanderAppender.cs MsmqAppender.cs
                        PatternFileAppender.cs SimpleSmtpAppender.cs
  Log:
  Added simple description to each of the sample appenders
  
  Revision  Changes    Path
  1.2       +9 -0      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/AsyncAppender.cs
  
  Index: AsyncAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/AsyncAppender.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AsyncAppender.cs  15 Jun 2005 15:57:29 -0000      1.1
  +++ AsyncAppender.cs  15 Jun 2005 16:26:40 -0000      1.2
  @@ -24,6 +24,15 @@
   

   namespace SampleAppendersApp.Appender

   {

  +     /// <summary>

  +     /// Appender that forwards LoggingEvents asynchronously

  +     /// </summary>

  +     /// <remarks>

  +     /// This appender forwards LoggingEvents to a list of attached 
appenders.

  +     /// The events are forwarded asynchronously using the ThreadPool.

  +     /// This allows the calling thread to be released quickly, however it 
does

  +     /// not guarantee the ordering of events delivered to the attached 
appenders.

  +     /// </remarks>

        public sealed class AsyncAppender : IAppender, IOptionHandler, 
IAppenderAttachable

        {

                private string m_name;

  
  
  
  1.2       +9 -0      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/FastDbAppender.cs
  
  Index: FastDbAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/FastDbAppender.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FastDbAppender.cs 13 Jun 2005 18:10:34 -0000      1.1
  +++ FastDbAppender.cs 15 Jun 2005 16:26:40 -0000      1.2
  @@ -22,6 +22,15 @@
   

   namespace SampleAppendersApp.Appender

   {

  +     /// <summary>

  +     /// Simple database appender

  +     /// </summary>

  +     /// <remarks>

  +     /// This database appender is very simple and does not support a 
configurable

  +     /// data schema. The schema supported is hardcoded into the appender.

  +     /// Also by not extending the AppenderSkeleton base class this appender

  +     /// avoids the serializable locking that it enforces.

  +     /// </remarks>

        public sealed class FastDbAppender : IAppender, IOptionHandler

        {

                private string m_name;

  
  
  
  1.3       +7 -0      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/FireEventAppender.cs
  
  Index: FireEventAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/FireEventAppender.cs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FireEventAppender.cs      17 Jan 2005 21:39:46 -0000      1.2
  +++ FireEventAppender.cs      15 Jun 2005 16:26:40 -0000      1.3
  @@ -38,6 +38,13 @@
                }

        }

   

  +     /// <summary>

  +     /// Appender that raises an event for each LoggingEvent received

  +     /// </summary>

  +     /// <remarks>

  +     /// Raises a MessageLoggedEvent for each LoggingEvent object received

  +     /// by this appender.

  +     /// </remarks>

        public class FireEventAppender : log4net.Appender.AppenderSkeleton

        {

                private static FireEventAppender m_instance;

  
  
  
  1.3       +7 -0      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/MessageBoxAppender.cs
  
  Index: MessageBoxAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/MessageBoxAppender.cs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageBoxAppender.cs     17 Jan 2005 21:39:46 -0000      1.2
  +++ MessageBoxAppender.cs     15 Jun 2005 16:26:40 -0000      1.3
  @@ -27,6 +27,13 @@
   

   namespace SampleAppendersApp.Appender

   {

  +     /// <summary>

  +     /// Displays messages as message boxes

  +     /// </summary>

  +     /// <remarks>

  +     /// Displays each LoggingEvent as a MessageBox. The message box is UI 
modal

  +     /// and will block the calling thread until it is dismissed by the user.

  +     /// </remarks>

        public class MessageBoxAppender : AppenderSkeleton

        {

                private PatternLayout m_titleLayout;

  
  
  
  1.3       +1 -1      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/MessageObjectExpanderAppender.cs
  
  Index: MessageObjectExpanderAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/MessageObjectExpanderAppender.cs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageObjectExpanderAppender.cs  17 Jan 2005 21:39:46 -0000      1.2
  +++ MessageObjectExpanderAppender.cs  15 Jun 2005 16:26:40 -0000      1.3
  @@ -46,7 +46,7 @@
                                                
loggingEvent.Properties[propertyInfo.Name] = 
propertyInfo.GetValue(messageObject, null);

                                        }

                                }

  -                             // Get all public instance fileds

  +                             // Get all public instance fields

                                foreach(FieldInfo fieldInfo in 
messageType.GetFields(BindingFlags.Instance | BindingFlags.Public))

                                {

                                        loggingEvent.Properties[fieldInfo.Name] 
= fieldInfo.GetValue(messageObject);

  
  
  
  1.2       +9 -0      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/MsmqAppender.cs
  
  Index: MsmqAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/MsmqAppender.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MsmqAppender.cs   31 May 2005 14:15:32 -0000      1.1
  +++ MsmqAppender.cs   15 Jun 2005 16:26:40 -0000      1.2
  @@ -23,6 +23,15 @@
   

   namespace SampleAppendersApp.Appender

   {

  +     /// <summary>

  +     /// Appender writes to a Microsoft Message Queue

  +     /// </summary>

  +     /// <remarks>

  +     /// This appender sends log events via a specified MSMQ queue.

  +     /// The queue specified in the QueueName (e.g. .\Private$\log-test) 
must already exist on

  +     /// the source machine.

  +     /// The message label and body are rendered using separate layouts.

  +     /// </remarks>

        public class MsmqAppender : log4net.Appender.AppenderSkeleton

        {

                private MessageQueue m_queue;

  
  
  
  1.2       +11 -0     
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/PatternFileAppender.cs
  
  Index: PatternFileAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/PatternFileAppender.cs,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PatternFileAppender.cs    15 Jun 2005 15:57:29 -0000      1.1
  +++ PatternFileAppender.cs    15 Jun 2005 16:26:40 -0000      1.2
  @@ -26,6 +26,17 @@
   

   namespace SampleAppendersApp.Appender

   {

  +     /// <summary>

  +     /// Appender that writes to a file named using a pattern

  +     /// </summary>

  +     /// <remarks>

  +     /// The file to write to is selected for each event using a

  +     /// PatternLayout specified in the File property. This allows

  +     /// each LoggingEvent to be written to a file based on properties

  +     /// of the event.

  +     /// The output file is opened to write each LoggingEvent as it arrives

  +     /// and closed afterwards.

  +     /// </remarks>

        public class PatternFileAppender : AppenderSkeleton

        {

                public PatternFileAppender()

  
  
  
  1.3       +8 -1      
logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/SimpleSmtpAppender.cs
  
  Index: SimpleSmtpAppender.cs
  ===================================================================
  RCS file: 
/home/cvs/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/SimpleSmtpAppender.cs,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleSmtpAppender.cs     17 Jan 2005 21:39:46 -0000      1.2
  +++ SimpleSmtpAppender.cs     15 Jun 2005 16:26:40 -0000      1.3
  @@ -22,11 +22,18 @@
   

   using log4net.Layout;

   using log4net.Core;

  -using log4net.Util;

   using log4net.Appender;

   

   namespace SampleAppendersApp.Appender

   {

  +     /// <summary>

  +     /// Simple mail appender that sends individual messages

  +     /// </summary>

  +     /// <remarks>

  +     /// This SimpleSmtpAppender sends each LoggingEvent received as a

  +     /// separate mail message.

  +     /// The mail subject line can be specified using a pattern layout.

  +     /// </remarks>

        public class SimpleSmtpAppender : AppenderSkeleton

        {

                public SimpleSmtpAppender()

  
  
  

Reply via email to