BaseLogSource

Ecng.Logging

The base implementation ILogSource.

Hereda de: Disposable

Implementa: ILogSource, IDisposable, IPersistable

Constructores

BaseLogSource
protected BaseLogSource()
baseLogSource = BaseLogSource()

Initialize BaseLogSource.

Propiedades

CurrentTime
public virtual DateTime CurrentTime { get; }
value = baseLogSource.CurrentTime

Current time, which will be passed to the Time.

Id
public virtual Guid Id { get; set; }
value = baseLogSource.Id
baseLogSource.Id = value

The unique identifier of the source.

IsLevelCacheable
internal bool IsLevelCacheable { get; }
value = baseLogSource.IsLevelCacheable

Whether this source keeps LogLevel and Parent where its own setters can invalidate the cache, so a walk crossing it may be remembered.

IsRoot
public bool IsRoot { get; set; }
value = baseLogSource.IsRoot
baseLogSource.IsRoot = value

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

LevelCache
internal LogLevelEntry LevelCache { get; }
value = baseLogSource.LevelCache

The level last remembered for this source, whichever set it was remembered in.

LogLevel
public virtual LogLevels LogLevel { get; set; }
value = baseLogSource.LogLevel
baseLogSource.LogLevel = value

The logging level for the source.

Name
public virtual string Name { get; set; }
value = baseLogSource.Name
baseLogSource.Name = value

The source name.

Parent
public ILogSource Parent { get; set; }
value = baseLogSource.Parent
baseLogSource.Parent = value

Parental logs source.

WalkCache
internal LogLevelWalk WalkCache { get; }
value = baseLogSource.WalkCache

The starting point last remembered for this source, whichever set it was remembered in.

Métodos

Load
public virtual void Load(SettingsStorage storage)
baseLogSource.Load(storage)

Load settings.

storage
Settings storage.
RaiseLog
protected virtual void RaiseLog(LogMessage message)
baseLogSource.RaiseLog(message)

To call the event Log.

message
A debug message.
Save
public virtual void Save(SettingsStorage storage)
baseLogSource.Save(storage)

Save settings.

storage
Settings storage.
SetCachedLogLevel
internal void SetCachedLogLevel(LogLevelEntry entry)
baseLogSource.SetCachedLogLevel(entry)

Remember as the effective level of this source.

entry
The entry, already made in the set it is to be read back in.
SetCachedWalk
internal void SetCachedWalk(LogLevelEntry[] current, ILogSource from)
baseLogSource.SetCachedWalk(current, from)

Remember that the answer for this source is whatever walking from gives, because from there on a level can move without the cache being told.

current
The set the walk was made in.
from
The link the walk has to start from.
ToString
public override string ToString()
result = baseLogSource.ToString()

Returns a string representation of the tuple, with values separated by commas.

Devuelve: A string representing the tuple's values.

Eventos

Log
public event Action<LogMessage> Log
baseLogSource.Log += handler

New debug message event.

ParentRemoved
public event Action<ILogSource> ParentRemoved
baseLogSource.ParentRemoved += handler

Parent removed.