C# Класс NLog.LogEventInfo

Represents the logging event.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ZeroDate System.DateTime

Private Properties

Свойство Тип Описание
AddCachedLayoutValue string
CalcFormattedMessage void
InitEventContext void
IsSafeToDeferFormatting bool
NeedToPreformatMessage bool
TryGetCachedLayoutValue bool

Открытые методы

Метод Описание
Create ( NLog.LogLevel logLevel, string loggerName, IFormatProvider formatProvider, [ message, object parameters ) : LogEventInfo

Creates the log event.

Create ( NLog.LogLevel logLevel, string loggerName, IFormatProvider formatProvider, object message ) : LogEventInfo

Creates the log event.

Create ( NLog.LogLevel logLevel, string loggerName, [ message ) : LogEventInfo

Creates the log event.

Create ( NLog.LogLevel logLevel, string loggerName, [ message, Exception exception ) : LogEventInfo

Creates the log event.

CreateNullEvent ( ) : LogEventInfo

Creates the null event.

LogEventInfo ( ) : System

Initializes a new instance of the LogEventInfo class.

LogEventInfo ( NLog.LogLevel level, string loggerName, IFormatProvider formatProvider, [ message, object parameters ) : System

Initializes a new instance of the LogEventInfo class.

LogEventInfo ( NLog.LogLevel level, string loggerName, IFormatProvider formatProvider, [ message, object parameters, Exception exception ) : System

Initializes a new instance of the LogEventInfo class.

LogEventInfo ( NLog.LogLevel level, string loggerName, [ message ) : System

Initializes a new instance of the LogEventInfo class.

SetStackTrace ( Windows.Adapters.StackTrace stackTrace, int userStackFrame ) : void

Sets the stack trace for the event info.

ToString ( ) : string

Returns a string representation of this log event.

WithContinuation ( AsyncContinuation asyncContinuation ) : NLog.Common.AsyncLogEventInfo

Creates AsyncLogEventInfo from this LogEventInfo by attaching the specified asynchronous continuation.

Приватные методы

Метод Описание
AddCachedLayoutValue ( Layout layout, string value ) : string
CalcFormattedMessage ( ) : void
InitEventContext ( ) : void
IsSafeToDeferFormatting ( object value ) : bool
NeedToPreformatMessage ( object parameters ) : bool
TryGetCachedLayoutValue ( Layout layout, string &value ) : bool

Описание методов

Create() публичный статический Метод

Creates the log event.
public static Create ( NLog.LogLevel logLevel, string loggerName, IFormatProvider formatProvider, [ message, object parameters ) : LogEventInfo
logLevel NLog.LogLevel The log level.
loggerName string Name of the logger.
formatProvider IFormatProvider The format provider.
message [ The message.
parameters object The parameters.
Результат LogEventInfo

Create() публичный статический Метод

Creates the log event.
public static Create ( NLog.LogLevel logLevel, string loggerName, IFormatProvider formatProvider, object message ) : LogEventInfo
logLevel NLog.LogLevel The log level.
loggerName string Name of the logger.
formatProvider IFormatProvider The format provider.
message object The message.
Результат LogEventInfo

Create() публичный статический Метод

Creates the log event.
public static Create ( NLog.LogLevel logLevel, string loggerName, [ message ) : LogEventInfo
logLevel NLog.LogLevel The log level.
loggerName string Name of the logger.
message [ The message.
Результат LogEventInfo

Create() публичный статический Метод

Creates the log event.
public static Create ( NLog.LogLevel logLevel, string loggerName, [ message, Exception exception ) : LogEventInfo
logLevel NLog.LogLevel The log level.
loggerName string Name of the logger.
message [ The message.
exception System.Exception The exception.
Результат LogEventInfo

CreateNullEvent() публичный статический Метод

Creates the null event.
public static CreateNullEvent ( ) : LogEventInfo
Результат LogEventInfo

LogEventInfo() публичный Метод

Initializes a new instance of the LogEventInfo class.
public LogEventInfo ( ) : System
Результат System

LogEventInfo() публичный Метод

Initializes a new instance of the LogEventInfo class.
public LogEventInfo ( NLog.LogLevel level, string loggerName, IFormatProvider formatProvider, [ message, object parameters ) : System
level NLog.LogLevel Log level.
loggerName string Logger name.
formatProvider IFormatProvider An IFormatProvider that supplies culture-specific formatting information.
message [ Log message including parameter placeholders.
parameters object Parameter array.
Результат System

LogEventInfo() публичный Метод

Initializes a new instance of the LogEventInfo class.
public LogEventInfo ( NLog.LogLevel level, string loggerName, IFormatProvider formatProvider, [ message, object parameters, Exception exception ) : System
level NLog.LogLevel Log level.
loggerName string Logger name.
formatProvider IFormatProvider An IFormatProvider that supplies culture-specific formatting information.
message [ Log message including parameter placeholders.
parameters object Parameter array.
exception System.Exception Exception information.
Результат System

LogEventInfo() публичный Метод

Initializes a new instance of the LogEventInfo class.
public LogEventInfo ( NLog.LogLevel level, string loggerName, [ message ) : System
level NLog.LogLevel Log level.
loggerName string Logger name.
message [ Log message including parameter placeholders.
Результат System

SetStackTrace() публичный Метод

Sets the stack trace for the event info.
public SetStackTrace ( Windows.Adapters.StackTrace stackTrace, int userStackFrame ) : void
stackTrace Windows.Adapters.StackTrace The stack trace.
userStackFrame int Index of the first user stack frame within the stack trace.
Результат void

ToString() публичный Метод

Returns a string representation of this log event.
public ToString ( ) : string
Результат string

WithContinuation() публичный Метод

Creates AsyncLogEventInfo from this LogEventInfo by attaching the specified asynchronous continuation.
public WithContinuation ( AsyncContinuation asyncContinuation ) : NLog.Common.AsyncLogEventInfo
asyncContinuation AsyncContinuation The asynchronous continuation.
Результат NLog.Common.AsyncLogEventInfo

Описание свойств

ZeroDate публичное статическое свойство

Gets the date of the first log event created.
public static DateTime,System ZeroDate
Результат System.DateTime