C# Class ODataRestierDynamic.Log.DynamicLogger

A dynamic logger.
Mostra file Open project: arcelormittalkriviyrih/odata_unified_svc

Private Properties

Property Type Description
AdjustSystemEventSource void
DynamicLogger System
GetLogFile string
GetPathToLogFile string
WriteLog void

Public Methods

Method Description
ConfigureFileLogger ( string logFilePath ) : void

Configures the default file logger.

StackTraceException ( Exception exception ) : string

String representation of given exception stack trace (with all inner exceptions)

WriteLoggerLogError ( string text ) : string

Logger writes log into the log-file

WriteLoggerLogError ( string text, Exception exception ) : string

Logger writes log into the log-file

WriteLoggerLogInfo ( string text ) : string

Logger writes log into the log-file

Private Methods

Method Description
AdjustSystemEventSource ( ) : void

Creates the system event source of the service if it does not exist.

DynamicLogger ( ) : System

Static constructor.

GetLogFile ( ) : string

Get path to log file on file system and create all directories in this path which not yet exists.

GetPathToLogFile ( ) : string

Returns path to log file for this web service

WriteLog ( string text, EventLogEntryType eventLogEntryType, Exception exception = null ) : void

Writes a log.

Method Details

ConfigureFileLogger() public static method

Configures the default file logger.
public static ConfigureFileLogger ( string logFilePath ) : void
logFilePath string
return void

StackTraceException() public method

String representation of given exception stack trace (with all inner exceptions)
public StackTraceException ( Exception exception ) : string
exception System.Exception
return string

WriteLoggerLogError() public method

Logger writes log into the log-file
public WriteLoggerLogError ( string text ) : string
text string String to write into the log
return string

WriteLoggerLogError() public method

Logger writes log into the log-file
public WriteLoggerLogError ( string text, Exception exception ) : string
text string String to write into the log
exception System.Exception Exception to log
return string

WriteLoggerLogInfo() public method

Logger writes log into the log-file
public WriteLoggerLogInfo ( string text ) : string
text string String to write into the log
return string