C# Class JaapNL.Utilities.EventLogger

Show file Open project: Jacco/Perpetuality

Public Methods

Method Description
GetEventText ( Exception exception, string eventText ) : string
GetIpOwner ( string aIp ) : string

Returns the name of the owner of the Ip, if available.

WriteEvent ( string eventText, EventType eventType, string eventSourceName ) : void

Write event with specified EventLogSource in Application-log, and specify EventType

WriteEvent ( string eventText, EventType eventType, string eventSourceName, Exception exception ) : void

Write event with specified EventLogSource in Application-log, and specify EventType

Private Methods

Method Description
WriteEvent ( string eventText, EventType eventType, string eventSourceName, string eventLogName, Exception exception ) : void

Write event in specified EventLogSource with specified EventType

Method Details

GetEventText() public static method

public static GetEventText ( Exception exception, string eventText ) : string
exception System.Exception
eventText string
return string

GetIpOwner() public static method

Returns the name of the owner of the Ip, if available.
public static GetIpOwner ( string aIp ) : string
aIp string
return string

WriteEvent() public static method

Write event with specified EventLogSource in Application-log, and specify EventType
public static WriteEvent ( string eventText, EventType eventType, string eventSourceName ) : void
eventText string The event-text
eventType EventType The EventType
eventSourceName string The EventLogSource-name (e.g. MyLittleSmtpService, will be created if it does not exist)
return void

WriteEvent() public static method

Write event with specified EventLogSource in Application-log, and specify EventType
public static WriteEvent ( string eventText, EventType eventType, string eventSourceName, Exception exception ) : void
eventText string The event-text
eventType EventType The EventType
eventSourceName string The EventLogSource-name (e.g. MyLittleSmtpService, will be created if it does not exist)
exception System.Exception
return void