Click or drag to resize

Logger Class

Manages the collection and reporting of logging information in a system.
Inheritance Hierarchy
SystemObject
  GSF.DiagnosticsLogger

Namespace: GSF.Diagnostics
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.177-beta
Syntax
public static class Logger
View Source

The Logger type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberShouldSuppressFirstChanceLogMessages Gets if First Chance Exception Log Messages should be suppressed.
Public propertyStatic memberShouldSuppressLogMessages Gets if Log Messages should be suppressed.
Top
Methods
 NameDescription
Public methodStatic memberAppendStackMessages(LogStackMessages) Temporarily appends data to the thread's stack so the data can be propagated to any messages generated on this thread. Be sure to call Dispose on the returned object to remove this from the stack.
Public methodStatic memberAppendStackMessages(String, String) Temporarily appends data to the thread's stack so the data can be propagated to any messages generated on this thread. Be sure to call Dispose on the returned object to remove this from the stack.
Public methodStatic memberCreatePublisher Looks up the type of the log source
Public methodStatic memberCreateSubscriber Creates a LogSubscriber
Public methodStatic memberGetStackMessages Searches the current stack frame for all related messages that will be published with this message.
Public methodStatic memberOverrideSuppressLogMessages Sets a flag that will allow log messages to be raised again. Remember to dispose of the callback to remove this override.
Public methodStatic memberSuppressFirstChanceExceptionLogMessages Sets a flag that will prevent First Chance Exception log messages from being raised on this thread. Remember to dispose of the callback to remove this suppression.
Public methodStatic memberSuppressLogMessages Sets a flag that will prevent log messages from being raised on this thread. Remember to dispose of the callback to remove this suppression.
Public methodStatic memberSwallowException Logs that a first chance exception was intentionally not handled for the provided reason. In the LogFileViewer it will filter messages differently if it was indicated that they were swallowed.
Top
Fields
 NameDescription
Public fieldStatic memberConsole The default console based log subscriber.
Public fieldStatic memberFileWriter The default file based log writer.
Top
See Also