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

A logger base class that implements log storage and retrieval.
Inheritance: ILogger
Afficher le fichier Open project: webappsuk/CoreLibraries

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Initializes a new instance of the LoggerBase class.

Method Details

Add() public abstract méthode

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.
Résultat Task

Dispose() public méthode

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

Flush() public méthode

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

LoggerBase() protected méthode

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.
Résultat System