GSF.Core by Grid Protection Alliance

<PackageReference Include="GSF.Core" Version="2.1.373-beta" />

 LogPublisher

public class LogPublisher
A publisher of log messages.

The stack messages that existed when this publisher was created. This can be modified by the user of this publisher. Any messages that get published by this class will automatically have this data added to the log message.

The stack trace that existed when this publisher was created. This can be modified by the user of this publisher. Any messages that get published by this class will automatically have this data added to the log message.

public void Publish(MessageLevel level, string eventName, string message = null, string details = null, Exception exception = null)

Raises a log message with the provided data.

public void Publish(MessageLevel level, MessageFlags flags, string eventName, string message = null, string details = null, Exception exception = null)

Raises a log message with the provided data.

public LogEventPublisher RegisterEvent(MessageLevel level, string eventName)

Initializes an LogEventPublisher with the provided values.

public LogEventPublisher RegisterEvent(MessageLevel level, MessageFlags flags, string eventName)

Initializes an LogEventPublisher with the provided values.

public LogEventPublisher RegisterEvent(MessageLevel level, string eventName, int stackTraceDepth, MessageRate messagesPerSecond, int burstLimit)

Initializes an LogEventPublisher with the provided values.

public LogEventPublisher RegisterEvent(MessageLevel level, MessageFlags flags, string eventName, int stackTraceDepth, MessageRate messagesPerSecond, int burstLimit)

Initializes an LogEventPublisher with the provided values.