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: 13.0.131
Syntax
C#
public class LogContext : ILogContext, INotCopyThreadItem, 
	IDisposable

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
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 propertyLogAlways
If true, the context always logs regardless of the action context settings
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
Methods
  NameDescription
Public methodStatic memberAppend
Appends text to the log.
Public methodStatic memberAppendLine
Appends text to the log.
Public methodAppendText
Appends the text.
Public methodClear
Clears the log
Public methodClose
Closes the log.
Public methodStatic memberCloseCurrent
Drops the current log context.
Public methodStatic memberCloseLog
Closes given log context.
Public methodDispose
Disposes the object.
Protected methodDispose(Boolean)
Disposes object's log.
Public methodStatic memberEnsureLog
Ensures the log for given GUID.
Public methodLogEvent
Writes a new record to the event log.
Public methodStatic memberLogEventToCurrent
Writes a new record to the event log using Current context.
Public methodStatic memberLogExists
Returns true if the given log exists.
Protected methodRaiseOnChanged
Fires the onchanged event.
Public methodSetAllowedContexts
Sets the list of the context names that the log context accepts. Use empty string for context which logs messages that do not provide context.
Top
Events
  NameDescription
Public eventOnChanged
Fires when the log has changed.
Public eventTextAppended
Event which fires if some text is appended to the log
Top
See Also