C# 클래스 GSF.Diagnostics.Logger

Manages the collection and reporting of logging information in a system.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

Private Properties

프로퍼티 타입 설명
CurrentDomain_FirstChanceException void
CurrentDomain_UnhandledException void
DisposeStackMessage void
DisposeSuppressionFlags void
GrowStackDisposal void
Initialize void
Logger System
Shutdown void

공개 메소드들

메소드 설명
AppendStackMessages ( LogStackMessages messages ) : IDisposable

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.

AppendStackMessages ( string key, string value ) : IDisposable

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.

CreatePublisher ( Type type, MessageClass classification ) : LogPublisher

Looks up the type of the log source

CreateSubscriber ( VerboseLevel level = VerboseLevel.None ) : LogSubscriber

Creates a LogSubscriber

GetStackMessages ( ) : LogStackMessages

Searches the current stack frame for all related messages that will be published with this message.

OverrideSuppressLogMessages ( ) : IDisposable

Sets a flag that will allow log messages to be raised again. Remember to dispose of the callback to remove this override.

SuppressFirstChanceExceptionLogMessages ( ) : IDisposable

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.

SuppressLogMessages ( ) : IDisposable

Sets a flag that will prevent log messages from being raised on this thread. Remember to dispose of the callback to remove this suppression.

SwallowException ( Exception ex, string message = null, string details = null, MessageFlags additionalFlags = MessageFlags.None ) : void

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.

비공개 메소드들

메소드 설명
CurrentDomain_FirstChanceException ( object sender, System e ) : void
CurrentDomain_UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
DisposeStackMessage ( int depth ) : void
DisposeSuppressionFlags ( int depth ) : void
GrowStackDisposal ( int desiredSize ) : void
Initialize ( ) : void

Ensures that the logger has been initialized.

Logger ( ) : System
Shutdown ( ) : void

Ensures that the logger is properly shutdown. This is called from ShutdownHandler.

메소드 상세

AppendStackMessages() 공개 정적인 메소드

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 static AppendStackMessages ( LogStackMessages messages ) : IDisposable
messages LogStackMessages
리턴 IDisposable

AppendStackMessages() 공개 정적인 메소드

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 static AppendStackMessages ( string key, string value ) : IDisposable
key string
value string
리턴 IDisposable

CreatePublisher() 공개 정적인 메소드

Looks up the type of the log source
public static CreatePublisher ( Type type, MessageClass classification ) : LogPublisher
type System.Type the type
classification MessageClass the classification of the type of messages that this publisher will raise.
리턴 LogPublisher

CreateSubscriber() 공개 정적인 메소드

Creates a LogSubscriber
public static CreateSubscriber ( VerboseLevel level = VerboseLevel.None ) : LogSubscriber
level VerboseLevel
리턴 LogSubscriber

GetStackMessages() 공개 정적인 메소드

Searches the current stack frame for all related messages that will be published with this message.
public static GetStackMessages ( ) : LogStackMessages
리턴 LogStackMessages

OverrideSuppressLogMessages() 공개 정적인 메소드

Sets a flag that will allow log messages to be raised again. Remember to dispose of the callback to remove this override.
public static OverrideSuppressLogMessages ( ) : IDisposable
리턴 IDisposable

SuppressFirstChanceExceptionLogMessages() 공개 정적인 메소드

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 static SuppressFirstChanceExceptionLogMessages ( ) : IDisposable
리턴 IDisposable

SuppressLogMessages() 공개 정적인 메소드

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 static SuppressLogMessages ( ) : IDisposable
리턴 IDisposable

SwallowException() 공개 정적인 메소드

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.
public static SwallowException ( Exception ex, string message = null, string details = null, MessageFlags additionalFlags = MessageFlags.None ) : void
ex System.Exception the exception that was swallowed
message string message to include, such as a reason why it was swallowed.
details string additional details.
additionalFlags MessageFlags additional flags that can be set with this swallowed exception.
리턴 void