C# Class WebApplications.Utilities.Logging.Loggers.LoggerBase

A logger base class that implements log storage and retrieval.
Inheritance: ILogger
Exibir arquivo Open project: webappsuk/CoreLibraries

Public Methods

Method Description
Add ( IEnumerable logs, CancellationToken token = default(CancellationToken) ) : Task

Adds the specified logs to storage in batches.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Flush ( CancellationToken token = default(CancellationToken) ) : Task

Force a flush of this logger.

Protected Methods

Method Description
LoggerBase ( [ name, bool allowMultiple = true, LoggingLevels validLevels = LoggingLevels.All ) : System

Initializes a new instance of the LoggerBase class.

Method Details

Add() public abstract method

Adds the specified logs to storage in batches.
public abstract Add ( IEnumerable logs, CancellationToken token = default(CancellationToken) ) : Task
logs IEnumerable The logs to add to storage.
token System.Threading.CancellationToken The token.
return Task

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Flush() public method

Force a flush of this logger.
public Flush ( CancellationToken token = default(CancellationToken) ) : Task
token System.Threading.CancellationToken The token.
return Task

LoggerBase() protected method

Initializes a new instance of the LoggerBase class.
protected LoggerBase ( [ name, bool allowMultiple = true, LoggingLevels validLevels = LoggingLevels.All ) : System
name [ The name.
allowMultiple bool if set to the logger supports multiple instances.
validLevels LoggingLevels The valid levels.
return System