Class EventLogHelper
Class for event helper methods
public class EventLogHelper : AbstractHelper<EventLogHelper>- Inheritance
- 
      objectEventLogHelper
- Inherited Members
- Extension Methods
Constructors
EventLogHelper()
public EventLogHelper()Properties
LogEventsToFile
Indicates if events are logged to the file.
public static bool LogEventsToFile { get; set; }Property Value
- bool
LogEventsToFileInternal
Indicates if events are logged to the file.
protected virtual bool LogEventsToFileInternal { get; set; }Property Value
- bool
LogFile
Physical path to the log file.
public static string LogFile { get; }Property Value
- string
LogFileInternal
Physical path to the log file.
protected virtual string LogFileInternal { get; }Property Value
- string
LogFolder
Physical path to folder where log file is saved.
public static string LogFolder { get; set; }Property Value
- string
LogFolderInternal
Physical path to folder where log file is saved.
protected virtual string LogFolderInternal { get; set; }Property Value
- string
Methods
ClearEventLog(int, string, string)
Clears entire event log and writes new event record with information about this action and the user who performed it.
public static void ClearEventLog(int userId, string userName, string ipAddress)Parameters
- userIdint
- User ID for logging purposes 
- userNamestring
- User name for logging purposes 
- ipAddressstring
- IP address for logging purposes 
ClearEventLogInternal(int, string, string)
Clears entire event log and writes new event record with information about this action and the user who performed it.
protected virtual void ClearEventLogInternal(int userId, string userName, string ipAddress)Parameters
- userIdint
- User ID for logging purposes 
- userNamestring
- User name for logging purposes 
- ipAddressstring
- IP address for logging purposes 
GetChangedFields(BaseInfo)
Gets the list of changed fields in the given object.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public static string GetChangedFields(BaseInfo bi)Parameters
- biBaseInfo
- BaseInfo object 
Returns
- string
GetChangedFieldsInternal(BaseInfo)
Gets the list of changed fields in the given object.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual string GetChangedFieldsInternal(BaseInfo bi)Parameters
- biBaseInfo
- BaseInfo object 
Returns
- string
GetEventText(EventLogInfo)
Gets log event text from DataRow
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public static string GetEventText(EventLogInfo eventObj)Parameters
- eventObjEventLogInfo
- Object containing log event data 
Returns
- string
- Text of log event 
GetEventTextInternal(EventLogData)
Gets log event text from event data object
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual string GetEventTextInternal(EventLogData eventObj)Parameters
- eventObjEventLogData
- Object containing log event data 
Returns
- string
- Text of log event 
GetEventTextInternal(EventLogInfo)
Gets log event text from DataRow
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual string GetEventTextInternal(EventLogInfo eventObj)Parameters
- eventObjEventLogInfo
- Object containing log event data 
Returns
- string
- Text of log event 
GetEventTypeText(string)
Returns user-friendly string for the given event type.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public static string GetEventTypeText(string eventType)Parameters
- eventTypestring
- Event type string 
Returns
- string
GetEventTypeTextInternal(string)
Returns user-friendly string for the given event type.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual string GetEventTypeTextInternal(string eventType)Parameters
- eventTypestring
- Event type string 
Returns
- string
GetFields(BaseInfo)
Gets the list of fields in the given object.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public static string GetFields(BaseInfo bi)Parameters
- biBaseInfo
- BaseInfo object 
Returns
- string
GetFieldsInternal(BaseInfo)
Gets the list of fields in the given object.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual string GetFieldsInternal(BaseInfo bi)Parameters
- biBaseInfo
- BaseInfo object 
Returns
- string
LogDelete(GeneralizedInfo)
Logs deletion of an object.
[Obsolete("The method will be removed in a future version. Use IInfoObjectEventHandler to handle info object events and log custom messages using ILogger.")]
public static void LogDelete(GeneralizedInfo infoObj)Parameters
- infoObjGeneralizedInfo
- Main info object 
LogDeleteInternal(GeneralizedInfo)
Logs deletion of an object.
[Obsolete("The method will be removed in a future version. The logic has been moved to IInfoObjectEventHandler service. Customization can be done by registering a custom implementation of it.")]
protected virtual void LogDeleteInternal(GeneralizedInfo infoObj)Parameters
- infoObjGeneralizedInfo
- Main info object 
LogEventToFile(EventLogInfo)
Logs the log object to file.
public static void LogEventToFile(EventLogInfo eventLogInfo)Parameters
- eventLogInfoEventLogInfo
- Event info object 
LogEventToFile(string, string, string, string, string, int, string, string, string, string, string, DateTime)
Logs the query to file.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public static void LogEventToFile(string eventType, string source, string eventCode, string eventDescription, string eventUrl, int userId, string userName, string ipAddress, string machineName, string eventUrlReferrer, string eventUserAgent, DateTime eventTime)Parameters
- eventTypestring
- Type of the event. I = information, E = error, W = warning 
- sourcestring
- Source of the event (Content, Administration, etc.) 
- eventCodestring
- Event code (Security, Update, Delete, etc.) 
- eventDescriptionstring
- Detailed description of the event 
- eventUrlstring
- Event URL address 
- userIdint
- ID of the user, who caused logged event 
- userNamestring
- Name of the user, who caused logged event 
- ipAddressstring
- IP Address of the user, who caused logged event 
- machineNamestring
- Name of machine 
- eventUrlReferrerstring
- URL referrer 
- eventUserAgentstring
- User agent 
- eventTimeDateTime
- Date and time when the event occurs 
LogEventToFileInternal(EventLogInfo)
Logs the log object to file.
protected virtual void LogEventToFileInternal(EventLogInfo eventLogInfo)Parameters
- eventLogInfoEventLogInfo
- Event info object 
LogEventToFileInternal(string, string, string, string, string, int, string, string, string, string, string, DateTime)
Logs the query to file.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
protected virtual void LogEventToFileInternal(string eventType, string source, string eventCode, string eventDescription, string eventUrl, int userId, string userName, string ipAddress, string machineName, string eventUrlReferrer, string eventUserAgent, DateTime eventTime)Parameters
- eventTypestring
- Type of the event. I = information, E = error, W = warning 
- sourcestring
- Source of the event (Content, Administration, etc.) 
- eventCodestring
- Event code (Security, Update, Delete, etc.) 
- eventDescriptionstring
- Detailed description of the event 
- eventUrlstring
- Event URL address 
- userIdint
- ID of the user, who caused logged event 
- userNamestring
- Name of the user, who caused logged event 
- ipAddressstring
- IP Address of the user, who caused logged event 
- machineNamestring
- Name of machine 
- eventUrlReferrerstring
- URL referrer 
- eventUserAgentstring
- User agent 
- eventTimeDateTime
- Date and time when the event occurs 
LogInsert(GeneralizedInfo)
Logs insertion of an object.
[Obsolete("The method will be removed in a future version. Use IInfoObjectEventHandler to handle info object events and log custom messages using ILogger.")]
public static void LogInsert(GeneralizedInfo infoObj)Parameters
- infoObjGeneralizedInfo
- Main info object 
LogInsertInternal(GeneralizedInfo)
Logs insertion of an object.
[Obsolete("The method will be removed in a future version. The logic has been moved to IInfoObjectEventHandler service. Customization can be done by registering a custom implementation of it.")]
protected virtual void LogInsertInternal(GeneralizedInfo infoObj)Parameters
- infoObjGeneralizedInfo
- Main info object 
LogUpdate(GeneralizedInfo)
Logs update of an object.
[Obsolete("The method will be removed in a future version. Use IInfoObjectEventHandler to handle info object events and log custom messages using ILogger.")]
public static void LogUpdate(GeneralizedInfo infoObj)Parameters
- infoObjGeneralizedInfo
- Main info object 
LogUpdateInternal(GeneralizedInfo)
Logs update of an object.
[Obsolete("The method will be removed in a future version. The logic has been moved to IInfoObjectEventHandler service. Customization can be done by registering a custom implementation of it.")]
protected virtual void LogUpdateInternal(GeneralizedInfo infoObj)Parameters
- infoObjGeneralizedInfo
- Main info object