Class ForwardingLogger
This implements a logger which accepts log items, but only stores them and later forwards them to the replacement logger Can be used to setup before everything is taken care of, to later replace with the file logger. When disposed, everything in the queue is written to Trace.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Dapplo.Log.LogFile
Assembly:Dapplo.Log.LogFile.dll
Syntax
public class ForwardingLogger : AbstractLogger, ILogger, ILoggerConfiguration, IDisposable
Methods
| Improve this Doc View SourceDispose()
Dispose takes care of cleaning all logged items
Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()
|
Improve this Doc
View Source
ReplacedWith(ILogger)
Pass all the written items on to the next logger
Declaration
public override void ReplacedWith(ILogger newLogger)
Parameters
Type | Name | Description |
---|---|---|
ILogger | newLogger | ILogger which replaces this |
Overrides
| Improve this Doc View SourceWrite(LogInfo, String, Object[])
Enqueue the current information so it can be written to the file, formatting is done later.. (improves performance for the UI) Preferably do NOT pass huge objects which need to be garbage collected
Declaration
public override void Write(LogInfo logInfo, string messageTemplate, params object[] logParameters)
Parameters
Type | Name | Description |
---|---|---|
LogInfo | logInfo | LogInfo |
System.String | messageTemplate | string |
System.Object[] | logParameters | params |