Click or drag to resize
LogContext Class
Provides the context for logging asynchronous events.
Inheritance Hierarchy
SystemObject
  CMS.EventLogLogContext

Namespace: CMS.EventLog
Assembly: CMS.EventLog (in CMS.EventLog.dll) Version: 8.2.23
Syntax
C#
public class LogContext : ILogContext, INotCopyThreadItem

The LogContext type exposes the following members.

Constructors
  NameDescription
Public methodLogContext
Constructor - Registers the context within request.
Public methodLogContext(Guid)
Constructor - Registers the context within request.
Top
Methods
  NameDescription
Public methodStatic memberAppend
Appends text to the log.
Public methodStatic memberAppendLine
Appends text to the log.
Public methodAppendText
Appends the text.
Public methodClose
Closes the log.
Public methodStatic memberCloseCurrent
Drops the current log context.
Public methodStatic memberCloseLog
Closes given log context.
Public methodStatic memberEnsureLog
Ensures the log for given GUID.
Public methodStatic memberLogEvent
Writes a new record to the event log.
Public methodStatic memberLogExists
Returns true if the given log exists.
Protected methodRaiseOnChanged
Fires the onchanged event.
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Fields
  NameDescription
Protected fieldmEvent
Info object containing event.
Protected fieldmLog
Current log.
Protected fieldmLogGuid
Logs GUID.
Protected fieldStatic membermLogs
Table of existing logs [GUID] -> [LogContext]
Protected fieldmLogSingleEvents
Indicates whether to log events one by one to event log.
Protected fieldmMultipleOperationEventCode
Explicit event log code used when LogSingleEvents is false (case of multiple logging).
Top
Properties
  NameDescription
Public propertyStatic memberCurrent
Gets or sets current log context.
Public propertyEvent
Info object of type EventLogInfo.
Public propertyEventURL
URL of event.
Public propertyIPAddress
IP address of client.
Public propertyLog
Gets the current log.
Public propertyLogGuid
Logs guid.
Public propertyLogSingleEvents
Indicates whether to log events one by one to event log.
Public propertyMachineName
Name of machine.
Public propertyMaxLength
Maximum length of the log. If the length is exceeded, the log is trimmed to half, offset is set and the log continues.
Public propertyMultipleOperationEventCode
Explicit event log code used when LogSingleEvents is false (case of multiple logging).
Public propertyOffset
Offset of a partial log in a complete log
Public propertyUrlReferrer
Referrer url.
Public propertyUserAgent
Browser identification.
Top
Events
  NameDescription
Public eventOnChanged
Fires when the log has changed.
Top
See Also