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

Inheritance: LoggerBase
Datei anzeigen Open project: webappsuk/CoreLibraries

Private Properties

Property Type Description
Clean void
MemoryLogger System

Public Methods

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

Adds the specified logs to storage in batches.

Clear ( ) : void

Clears this instance.

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.

Private Methods

Method Description
Clean ( ) : void

Cleans this instance.

MemoryLogger ( [ name, System.TimeSpan cacheExpiry = default(TimeSpan), int maximumLogEntries = 10000, LoggingLevels validLevels = LoggingLevels.All ) : System

Initializes a new instance of the MemoryLogger class.

Method Details

Add() public method

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

Clear() public method

Clears this instance.
public Clear ( ) : void
return void

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