C# Class Quilt4.Service.Logging.EventLogger

Inheritance: IServiceLog
显示文件 Open project: Quilt4/Quilt4.Service

Public Methods

Method Description
CanWriteToLog ( Exception &exception ) : bool
GetAllLogEntries ( ) : IEnumerable
LogException ( Exception exception, LogLevel logLevel ) : void
LogInformation ( string message ) : void
LogWarning ( string message ) : void

Private Methods

Method Description
AssureEventLogSource ( ) : Exception
GetMessageFromException ( Exception exception, bool appendStackTrace = true ) : string
WriteToEventLog ( string message, EventLogEntryType eventLogEntryType ) : void

Method Details

CanWriteToLog() public method

public CanWriteToLog ( Exception &exception ) : bool
exception System.Exception
return bool

GetAllLogEntries() public method

public GetAllLogEntries ( ) : IEnumerable
return IEnumerable

LogException() public method

public LogException ( Exception exception, LogLevel logLevel ) : void
exception System.Exception
logLevel LogLevel
return void

LogInformation() public method

public LogInformation ( string message ) : void
message string
return void

LogWarning() public method

public LogWarning ( string message ) : void
message string
return void