NLog.LogEventInfo
Represents the logging event.
Gets the date of the first log event created.
Gets the callsite class name
Gets the callsite source file path
Gets the callsite source file line number
Gets the callsite member function name
Gets or sets the exception information.
Gets or sets the format provider that was provided while logging or null
when no formatProvider was specified.
Gets the formatted message.
Checks if any per-event properties (Without allocation)
Gets a value indicating whether stack trace has been set for this event.
Gets or sets the level of the logging event.
Gets or sets the logger name.
Gets or sets the log message including any parameter placeholders.
Gets or sets the message formatter for generating FormattedMessage
Uses string.Format(...) when nothing else has been configured.
Gets the named parameters extracted from parsing Message as MessageTemplate
Gets or sets the parameter values or null if no parameters have been specified.
Gets the dictionary of per-event context properties.
Gets the sequence number for this LogEvent, which monotonously increasing for each LogEvent until int-overflow
Marked obsolete with NLog 6.0, instead use ${counter:sequence=global} or ${guid:GeneratedFromLogEvent=true}
Gets the entire stack trace.
Gets or sets the timestamp of the logging event.
Obsolete and replaced by CallerMemberName or ${callsite} with NLog v5.3.
Gets the stack frame of the method that did the logging.
Gets the number index of the stack frame that represents the user
code (not the NLog code).
public LogEventInfo()
Initializes a new instance of the LogEventInfo class.
Initializes a new instance of the LogEventInfo class.
public LogEventInfo(LogLevel level, string loggerName, string message, IList<MessageTemplateParameter> messageTemplateParameters)
Initializes a new instance of the LogEventInfo class.
public LogEventInfo(LogLevel level, string loggerName, string formattedMessage, string messageTemplate, IList<MessageTemplateParameter> messageTemplateParameters)
Initializes a new instance of the LogEventInfo class.
public LogEventInfo(LogLevel level, string loggerName, string formattedMessage, string messageTemplate, ReadOnlySpan<MessageTemplateParameter> messageTemplateParameters)
Initializes a new instance of the LogEventInfo class.
public LogEventInfo(LogLevel level, string loggerName, string message, IReadOnlyList<KeyValuePair<object, object>> eventProperties)
Initializes a new instance of the LogEventInfo class.
public LogEventInfo(LogLevel level, string loggerName, IFormatProvider formatProvider, string message, object[] parameters)
Initializes a new instance of the LogEventInfo class.
public LogEventInfo(LogLevel level, string loggerName, IFormatProvider formatProvider, string message, object[] parameters, Exception exception)
Initializes a new instance of the LogEventInfo class.
Creates the log event.
public static LogEventInfo Create(LogLevel logLevel, string loggerName, IFormatProvider formatProvider, string message, object[] parameters)
Creates the log event.
public static LogEventInfo Create(LogLevel logLevel, string loggerName, IFormatProvider formatProvider, object message)
Creates the log event.
public static LogEventInfo Create(LogLevel logLevel, string loggerName, Exception exception, IFormatProvider formatProvider, string message)
Creates the log event.
public static LogEventInfo Create(LogLevel logLevel, string loggerName, Exception exception, IFormatProvider formatProvider, string message, object[] parameters)
Creates the log event.
Creates the null event.
public void SetCallerInfo(string callerClassName, string callerMemberName, string callerFilePath, int callerLineNumber)
Sets the details retrieved from the Caller Information Attributes
Sets the stack trace for the event info.
Sets the stack trace for the event info.
Creates AsyncLogEventInfo from this LogEventInfo by attaching the specified asynchronous continuation.