C# 클래스 GSF.ErrorManagement.ErrorLogger

상속: System.ComponentModel.Component, ISupportLifecycle, ISupportInitialize, IProvideStatus, IPersistSettings
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

Private Properties

프로퍼티 타입 설명
BeginInit void
EndInit void
GetActionText string
GetApplicationInfo string
GetErrorText string
GetExceptionGeneralInfo string
GetExceptionStackTrace string
GetScopeText string
GetSystemInfo string
ProcessExceptionsToDatabase void
UnhandledException void
m_databaseErrorQueue_ProcessException void
m_tableSizeCurtailmentTimer_Elapsed void

공개 메소드들

메소드 설명
ErrorLogger ( ) : System

Initializes a new instance of the ErrorLogger class.

ErrorLogger ( IContainer container ) : System

Initializes a new instance of the ErrorLogger class.

GetExceptionInfo ( Exception ex, bool includeUserInfo ) : string

Gets information about an Exception complete with system and application information.

Initialize ( ) : void

Initializes the ErrorLogger object.

Initialize() is to be called by user-code directly only if the ErrorLogger object is not consumed through the designer surface of the IDE.

LoadSettings ( ) : void

Loads saved settings for the ErrorLogger object from the config file if the PersistSettings property is set to true.

Log ( Exception exception ) : void

Logs information about the encountered Exception.

Log ( Exception exception, bool exitApplication ) : void

Logs information about the encountered Exception.

SaveSettings ( ) : void

Saves settings for the ErrorLogger object to the config file if the PersistSettings property is set to true.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the ErrorLogger object and optionally releases the managed resources.

ExceptionToDatabase ( Exception exception ) : void

Logs encountered Exception to the database.

ExceptionToEmail ( Exception exception ) : void

Logs encountered Exception to an e-mail message.

ExceptionToEventLog ( Exception exception ) : void

Logs encountered Exception to the EventLog.

ExceptionToFile ( Exception exception ) : void

Logs encountered Exception to the ErrorLog.

ExceptionToUI ( Exception exception ) : void

Logs encountered Exception to the application UI.

ExceptionToWebPage ( ) : void

Shows Exception information in a Web Site.

ExceptionToWindowsCui ( ) : void

Shows Exception information in a Console Application.

ExceptionToWindowsGui ( ) : void

Shows Exception information in a Windows Application.

GetEmailAttachments ( ) : string

Gets or sets the comma-separated or semicolon-separated list of file names to be attached to the Mail message.

GetExtendedMoreInfoText ( string bullet ) : string

Allows other loggers to extend "more info text".

GetMoreInfoText ( ) : string

Default Delegate for MoreInfoTextMethod.

OnLoggingException ( Exception exception ) : void

Raises the LoggingException event.

Register ( ) : bool

Registers the ErrorLogger object to handle unhandled Exception if the HandleUnhandledException property is set to true.

Unregister ( ) : bool

Unregister the ErrorLogger object from handling unhandled Exception.

비공개 메소드들

메소드 설명
BeginInit ( ) : void
EndInit ( ) : void
GetActionText ( ) : string

Default Delegate for ActionTextMethod.

GetApplicationInfo ( ) : string

Gets information about the current application.

GetErrorText ( ) : string

Default Delegate for ErrorTextMethod.

GetExceptionGeneralInfo ( Exception ex ) : string

Gets common information about an Exception.

GetExceptionStackTrace ( Exception ex ) : string

Gets stack trace information about an Exception.

GetScopeText ( ) : string

Default Delegate for ScopeTextMethod.

GetSystemInfo ( bool includeUserInfo ) : string

Gets information about the system where current application is executing.

ProcessExceptionsToDatabase ( Tuple exceptions ) : void
UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
m_databaseErrorQueue_ProcessException ( object sender, EventArgs e ) : void
m_tableSizeCurtailmentTimer_Elapsed ( object sender, System e ) : void

메소드 상세

Dispose() 보호된 메소드

Releases the unmanaged resources used by the ErrorLogger object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

ErrorLogger() 공개 메소드

Initializes a new instance of the ErrorLogger class.
public ErrorLogger ( ) : System
리턴 System

ErrorLogger() 공개 메소드

Initializes a new instance of the ErrorLogger class.
public ErrorLogger ( IContainer container ) : System
container IContainer object that contains the .
리턴 System

ExceptionToDatabase() 보호된 메소드

Logs encountered Exception to the database.
protected ExceptionToDatabase ( Exception exception ) : void
exception System.Exception that was encountered.
리턴 void

ExceptionToEmail() 보호된 메소드

Logs encountered Exception to an e-mail message.
protected ExceptionToEmail ( Exception exception ) : void
exception System.Exception that was encountered.
리턴 void

ExceptionToEventLog() 보호된 메소드

Logs encountered Exception to the EventLog.
protected ExceptionToEventLog ( Exception exception ) : void
exception System.Exception that was encountered.
리턴 void

ExceptionToFile() 보호된 메소드

Logs encountered Exception to the ErrorLog.
protected ExceptionToFile ( Exception exception ) : void
exception System.Exception that was encountered.
리턴 void

ExceptionToUI() 보호된 메소드

Logs encountered Exception to the application UI.
protected ExceptionToUI ( Exception exception ) : void
exception System.Exception that was encountered.
리턴 void

ExceptionToWebPage() 보호된 메소드

Shows Exception information in a Web Site.
protected ExceptionToWebPage ( ) : void
리턴 void

ExceptionToWindowsCui() 보호된 메소드

Shows Exception information in a Console Application.
protected ExceptionToWindowsCui ( ) : void
리턴 void

ExceptionToWindowsGui() 보호된 메소드

Shows Exception information in a Windows Application.
protected ExceptionToWindowsGui ( ) : void
리턴 void

GetEmailAttachments() 보호된 메소드

Gets or sets the comma-separated or semicolon-separated list of file names to be attached to the Mail message.
protected GetEmailAttachments ( ) : string
리턴 string

GetExceptionInfo() 공개 정적인 메소드

Gets information about an Exception complete with system and application information.
public static GetExceptionInfo ( Exception ex, bool includeUserInfo ) : string
ex System.Exception whose information is to be retrieved.
includeUserInfo bool true if user information is to be include; otherwise false.
리턴 string

GetExtendedMoreInfoText() 보호된 메소드

Allows other loggers to extend "more info text".
protected GetExtendedMoreInfoText ( string bullet ) : string
bullet string Type of bullet to use for extended info text.
리턴 string

GetMoreInfoText() 보호된 메소드

Default Delegate for MoreInfoTextMethod.
protected GetMoreInfoText ( ) : string
리턴 string

Initialize() 공개 메소드

Initializes the ErrorLogger object.
Initialize() is to be called by user-code directly only if the ErrorLogger object is not consumed through the designer surface of the IDE.
public Initialize ( ) : void
리턴 void

LoadSettings() 공개 메소드

Loads saved settings for the ErrorLogger object from the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public LoadSettings ( ) : void
리턴 void

Log() 공개 메소드

Logs information about the encountered Exception.
public Log ( Exception exception ) : void
exception System.Exception Encountered whose information is to be logged.
리턴 void

Log() 공개 메소드

Logs information about the encountered Exception.
public Log ( Exception exception, bool exitApplication ) : void
exception System.Exception Encountered whose information is to be logged.
exitApplication bool true to exit the application; otherwise false.
리턴 void

OnLoggingException() 보호된 메소드

Raises the LoggingException event.
protected OnLoggingException ( Exception exception ) : void
exception System.Exception to send to event.
리턴 void

Register() 보호된 메소드

Registers the ErrorLogger object to handle unhandled Exception if the HandleUnhandledException property is set to true.
protected Register ( ) : bool
리턴 bool

SaveSettings() 공개 메소드

Saves settings for the ErrorLogger object to the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public SaveSettings ( ) : void
리턴 void

Unregister() 보호된 메소드

Unregister the ErrorLogger object from handling unhandled Exception.
protected Unregister ( ) : bool
리턴 bool