Class LogEvent
- Namespace
- Dynamicweb.Logging.Log
Events
- Assembly
- Dynamicweb.Core.dll
- Inheritance
-
Log
Event
- Inherited Members
Constructors
LogEvent()
Creates a new prefilled LogEvent.
LogEvent(string, Exception)
Creates a LogEvent based upon the given exception. Logs the exception details to disk.
Parameters
LogEvent(string, string, string?)
Creates a LogEvent based upon an action and a description.
Parameters
category
stringThe current action performed by the program
description
stringDescription of what is happening
action
stringSubsection of a specific area of actions
Properties
Action
Gets or sets the action type.
Property Value
Category
Gets or sets the category type.
Property Value
CreateDate
Gets the Create date (local time).
Property Value
Description
Gets or sets the description.
Property Value
ExceptionType
Gets the type of the exception.
Property Value
FileLogPath
Gets the path to the logfile.
Property Value
Id
Gets or sets the identifier.
Property Value
Level
Level of the logged event.
Property Value
MachineName
Gets the name of the machine that created the logevent.
Property Value
Url
Request url if any was available during logevent
Property Value
UserId
Id of user.
Property Value
UserName
Name of user at logtime.
Property Value
UtcOffset
Utc offset.
Property Value
Methods
GetFriendlyDateOffset()
Returns
GetLogFileContent()
Gets the content of the logfile.
Returns
- string
logFileContent
GetLogger()
Gets the logger for this object.
Returns
- ILogger
logger
SetCreateDate(DateTime, bool)
Sets the log create date and the UTC offset.
Parameters
SetExceptionType(Exception)
Parameters
ex
Exception
SetFileLogPath(string)
Sets the path to the logfile for this object.
Parameters
relativePath
stringRelative path to logfile