Table of Contents

Class LogListener

Namespace
StockSharp.Logging
Assembly
StockSharp.Logging.dll

The base class that monitors the event Log and saves to some storage.

public abstract class LogListener : Disposable, ILogListener, IPersistable, IDisposable
Inheritance
LogListener
Implements
IPersistable
Derived
Extension Methods

Constructors

LogListener()

Initialize LogListener.

protected LogListener()

Properties

CanSave

Can save listener.

public virtual bool CanSave { get; }

Property Value

bool

DateFormat

Date format. By default yyyy/MM/dd.

public string DateFormat { get; set; }

Property Value

string

Filters

Messages filters that specify which messages should be handled.

public IList<Func<LogMessage, bool>> Filters { get; }

Property Value

IList<Func<LogMessage, bool>>

TimeFormat

Time format. By default HH:mm:ss.fff.

public string TimeFormat { get; set; }

Property Value

string

Methods

Load(SettingsStorage)

Load settings.

public virtual void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnWriteMessage(LogMessage)

To record a message.

protected virtual void OnWriteMessage(LogMessage message)

Parameters

message LogMessage

A debug message.

OnWriteMessages(IEnumerable<LogMessage>)

To record messages.

protected virtual void OnWriteMessages(IEnumerable<LogMessage> messages)

Parameters

messages IEnumerable<LogMessage>

Debug messages.

Save(SettingsStorage)

Save settings.

public virtual void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

WriteMessages(IEnumerable<LogMessage>)

To record messages.

public void WriteMessages(IEnumerable<LogMessage> messages)

Parameters

messages IEnumerable<LogMessage>

Debug messages.