Skip to content

AsyncOutput Class

Definition

namespace Sharplog.Outputs

public abstract class AsyncOutput : Output, IDisposable

Object
Output
   AsyncOutput

Implements: System.IDisposable

Base class for async outputs.

Constructors

Name
AsyncOutput(int, string, LevelContainer)

Properties

Name Type GET SET
SuspendTime int
Format string
Levels LevelContainer

Events

Name Delegate Modifiers
OnStart EventHandler protected
OnDispose EventHandler protected

Methods

Name Modifiers Returns
Start() public
WriteNonBlocking((string, Log)[]) public abstract

Inherited methods

Name Modifiers Returns
Write(string, Log) public
Dispose() public

Constructors

AsyncOutput(int, string, LevelContainer)

public AsyncOutput(
    int suspendTime = 500,
    string format = null,
    LevelContainer levels = null)
    : base(format, levels)

Initializes a new instance of the AsyncOutput class.

Parameter

suspendTime int · 500
The time the output waits until it checks for new logs in ms.
format string · null
The format.
levels LevelContainer · null
The level settings.

Properties

SuspendTime

public int SuspendTime { get; set; }
Type: int

Gets or sets the time the output waits until it checks for new logs in ms.

Events

OnStart

protected event EventHandler OnStart;
Delegate: EventHandler

Event called when the output gets started.

OnDispose

protected event EventHandler OnDispose;
Delegate: EventHandler

Event called when the output gets disposed.

Methods

Start()

public void Start()

Starts this instance.

WriteNonBlocking((string, Log)[])

public abstract void WriteNonBlocking((string, Log)[] logs)

Writes the specified formatted log.

Parameter

logs (string, Log)[] ·
The logs.