LogManager
Ecng.Logging
Messages logging manager that monitors the Log event and forwards messages to the Listeners.
Herda de: Disposable
Implementa: IPersistable
Construtores
LogManager
public LogManager()
logManager = LogManager()
Initializes a new instance of the LogManager.
LogManager
public LogManager(bool asyncMode)
logManager = LogManager(asyncMode)
Initializes a new instance of the LogManager.
- asyncMode
- Asynchronous mode.
Propriedades
Application
public ILogReceiver Application { get; set; }
value = logManager.Application
logManager.Application = value
The all application level logs recipient.
ClearPendingOnDispose
public bool ClearPendingOnDispose { get; set; }
value = logManager.ClearPendingOnDispose
logManager.ClearPendingOnDispose = value
Clear pending messages on dispose.
FlushInterval
public TimeSpan FlushInterval { get; set; }
value = logManager.FlushInterval
logManager.FlushInterval = value
Sending interval of messages collected from Sources to the Listeners. The default is 500 ms.
Instance
public static LogManager Instance { get; }
value = LogManager.Instance
The ambient LogManager singleton — the first instance constructed.
Listeners
public IList<ILogListener> Listeners { get; }
value = logManager.Listeners
Messages loggers arriving from Sources.
Sources
public IList<ILogSource> Sources { get; }
value = logManager.Sources
Logs sources which are listened to the event Log.
Métodos
DisposeManaged
protected override void DisposeManaged()
logManager.DisposeManaged()
Release resources.
Load
public virtual void Load(SettingsStorage storage)
logManager.Load(storage)
Load settings.
- storage
- Settings storage.
Save
public virtual void Save(SettingsStorage storage)
logManager.Save(storage)
Save settings.
- storage
- Settings storage.