Click or drag to resize

LogEventInfo Class

Represents the logging event.
Inheritance Hierarchy
SystemObject
  NLogLogEventInfo

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax
public class LogEventInfo

The LogEventInfo type exposes the following members.

Constructors
  NameDescription
Public methodLogEventInfo
Initializes a new instance of the LogEventInfo class.
Public methodLogEventInfo(LogLevel, String, String)
Initializes a new instance of the LogEventInfo class.
Public methodLogEventInfo(LogLevel, String, String, IListMessageTemplateParameter)
Initializes a new instance of the LogEventInfo class.
Public methodLogEventInfo(LogLevel, String, String, IReadOnlyListKeyValuePairObject, Object)
Initializes a new instance of the LogEventInfo class.
Public methodLogEventInfo(LogLevel, String, IFormatProvider, String, Object)
Initializes a new instance of the LogEventInfo class.
Public methodLogEventInfo(LogLevel, String, String, String, IListMessageTemplateParameter)
Initializes a new instance of the LogEventInfo class.
Public methodLogEventInfo(LogLevel, String, IFormatProvider, String, Object, Exception)
Initializes a new instance of the LogEventInfo class.
Top
Properties
  NameDescription
Public propertyCallerClassName
Gets the callsite class name
Public propertyCallerFilePath
Gets the callsite source file path
Public propertyCallerLineNumber
Gets the callsite source file line number
Public propertyCallerMemberName
Gets the callsite member function name
Public propertyException
Gets or sets the exception information.
Public propertyFormatProvider
Gets or sets the format provider that was provided while logging or when no formatProvider was specified.
Public propertyFormattedMessage
Gets the formatted message.
Public propertyHasProperties
Checks if any per-event properties (Without allocation)
Public propertyHasStackTrace
Gets a value indicating whether stack trace has been set for this event.
Public propertyLevel
Gets or sets the level of the logging event.
Public propertyLoggerName
Gets or sets the logger name.
Public propertyMessage
Gets or sets the log message including any parameter placeholders.
Public propertyMessageFormatter
Gets or sets the message formatter for generating FormattedMessage Uses string.Format(...) when nothing else has been configured.
Public propertyMessageTemplateParameters
Gets the named parameters extracted from parsing Message as MessageTemplate
Public propertyParameters
Gets or sets the parameter values or null if no parameters have been specified.
Public propertyProperties
Gets the dictionary of per-event context properties.
Public propertySequenceID
Gets the unique identifier of log event which is automatically generated and monotonously increasing.
Public propertyStackTrace
Gets the entire stack trace.
Public propertyTimeStamp
Gets or sets the timestamp of the logging event.
Public propertyUserStackFrame Obsolete.
Obsolete and replaced by CallerMemberName or ${callsite} with NLog v5.3. Gets the stack frame of the method that did the logging.
Public propertyUserStackFrameNumber
Gets the number index of the stack frame that represents the user code (not the NLog code).
Top
Methods
Fields
  NameDescription
Public fieldStatic memberZeroDate
Gets the date of the first log event created.
Top
See Also