Table of Contents

Class BaseLogSource

Namespace
StockSharp.Logging
Assembly
StockSharp.Logging.dll

The base implementation ILogSource.

public abstract class BaseLogSource : Disposable, ILogSource, IDisposable, IPersistable
Inheritance
BaseLogSource
Implements
IPersistable
Derived
Extension Methods

Constructors

BaseLogSource()

Initialize BaseLogSource.

protected BaseLogSource()

Properties

CurrentTime

Current time, which will be passed to the Time.

[Browsable(false)]
public virtual DateTimeOffset CurrentTime { get; }

Property Value

DateTimeOffset

Id

The unique identifier of the source.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Id", Description = "Id", GroupName = "Logging", Order = 1000)]
public virtual Guid Id { get; set; }

Property Value

Guid

IsRoot

Whether the source is the root (even if Parent is not equal to null).

[Browsable(false)]
public bool IsRoot { get; set; }

Property Value

bool

LogLevel

The logging level for the source.

[Display(ResourceType = typeof(LocalizedStrings), Name = "LogLevel", Description = "LogLevelDot", GroupName = "Logging", Order = 1001)]
public virtual LogLevels LogLevel { get; set; }

Property Value

LogLevels

Name

The source name.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Name", Description = "LogSourceName", GroupName = "Logging", Order = 1001)]
public virtual string Name { get; set; }

Property Value

string

Parent

Parental logs source.

[Browsable(false)]
public ILogSource Parent { get; set; }

Property Value

ILogSource

Methods

Load(SettingsStorage)

Load settings.

public virtual void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

RaiseLog(LogMessage)

To call the event Log.

protected virtual void RaiseLog(LogMessage message)

Parameters

message LogMessage

A debug message.

Save(SettingsStorage)

Save settings.

public virtual void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

ToString()

public override string ToString()

Returns

string

Events

Log

New debug message event.

public event Action<LogMessage> Log

Event Type

Action<LogMessage>

ParentRemoved

Parent removed.

public event Action<ILogSource> ParentRemoved

Event Type

Action<ILogSource>