Click or drag to resize
Logger Class
This is a very simply class to abstract the use of log4net. If log4net is included in the project, you simply use this class as it is. If you remove the log4net.dll from your project, all you have to do is uncomment #define LOG4NET (say //#define LOG4NET) at the top of this file. You should definitely remove log4net when building Web players as it increases the size significantly (around 1 to 2 MB!)
Inheritance Hierarchy
SystemObject
  Slash.Diagnostics.LoggingLogger

Namespace: Slash.Diagnostics.Logging
Assembly: Slash.Diagnostics (in Slash.Diagnostics.dll) Version: 1.0.6018.40181
Syntax
public class Logger : ILogger

The Logger type exposes the following members.

Constructors
  NameDescription
Public methodLogger
A logger to be used for logging statements in the code. It is recommended to follow a pattern for instantiating this:
private static readonly JCsLogger log = new JCsLogger(typeof(YourClassName));
                ...
                log.*(yourLoggingStuff); // Debug/Info/Warn/Error/Fatal[Format]
Top
Properties
Methods
  NameDescription
Public methodStatic memberConfigure(Stream)
Public methodStatic memberConfigure(String)
Public methodDebug(Object)
Public methodDebug(Object, Exception)
Public methodDebugFormat(String, Object)
Public methodDebugFormat(IFormatProvider, String, Object)
Public methodError(Object)
Public methodError(Object, Exception)
Public methodErrorFormat(String, Object)
Public methodErrorFormat(IFormatProvider, String, Object)
Public methodFatal(Object)
Public methodFatal(Object, Exception)
Public methodFatalFormat(String, Object)
Public methodFatalFormat(IFormatProvider, String, Object)
Public methodInfo(Object)
Public methodInfo(Object, Exception)
Public methodInfoFormat(String, Object)
Public methodInfoFormat(IFormatProvider, String, Object)
Public methodWarn(Object)
Public methodWarn(Object, Exception)
Public methodWarnFormat(String, Object)
Public methodWarnFormat(IFormatProvider, String, Object)
Top
See Also