nicko 2004/06/01 11:36:23
Modified: src/Appender ColoredConsoleAppender.cs
Log:
Marked all non default constructors as Obsolete.
The correct usage model for appenders is to create an instance using the
default constructor, set the properties on the instance and then call
ActivateOptions().
The alternative constructors represent a set of different and possible
incorrect initialisation paths.
Revision Changes Path
1.6 +2 -0 logging-log4net/src/Appender/ColoredConsoleAppender.cs
Index: ColoredConsoleAppender.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Appender/ColoredConsoleAppender.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ColoredConsoleAppender.cs 30 May 2004 17:58:23 -0000 1.5
+++ ColoredConsoleAppender.cs 1 Jun 2004 18:36:23 -0000 1.6
@@ -163,6 +163,7 @@
/// The instance of the <see cref="ColoredConsoleAppender" />
class is set up to write
/// to the standard output stream.
/// </remarks>
+ [Obsolete("Instead use the default constructor and set the
Layout property")]
public ColoredConsoleAppender(ILayout layout) : this(layout,
false)
{
}
@@ -178,6 +179,7 @@
/// the standard error output stream. Otherwise, output is
written to the standard
/// output stream.
/// </remarks>
+ [Obsolete("Instead use the default constructor and set the
Layout & Target properties")]
public ColoredConsoleAppender(ILayout layout, bool
writeToErrorStream)
{
Layout = layout;