C# Class NLog.LogEventInfo

Represents the logging event.
Mostra file Open project: shiftkey/winrt-backport-hilarity Class Usage Examples

Public Properties

Property Type Description
ZeroDate System.DateTime

Private Properties

Property Type Description
AddCachedLayoutValue string
CalcFormattedMessage void
InitEventContext void
IsSafeToDeferFormatting bool
NeedToPreformatMessage bool
TryGetCachedLayoutValue bool

Public Methods

Method Description
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.

Private Methods

Method Description
AddCachedLayoutValue ( Layout layout, string value ) : string
CalcFormattedMessage ( ) : void
InitEventContext ( ) : void
IsSafeToDeferFormatting ( object value ) : bool
NeedToPreformatMessage ( object parameters ) : bool
TryGetCachedLayoutValue ( Layout layout, string &value ) : bool

Method Details

Create() public static method

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.
return LogEventInfo

Create() public static method

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.
return LogEventInfo

Create() public static method

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.
return LogEventInfo

Create() public static method

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.
return LogEventInfo

CreateNullEvent() public static method

Creates the null event.
public static CreateNullEvent ( ) : LogEventInfo
return LogEventInfo

LogEventInfo() public method

Initializes a new instance of the LogEventInfo class.
public LogEventInfo ( ) : System
return System

LogEventInfo() public method

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.
return System

LogEventInfo() public method

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.
return System

LogEventInfo() public method

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.
return System

SetStackTrace() public method

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.
return void

ToString() public method

Returns a string representation of this log event.
public ToString ( ) : string
return string

WithContinuation() public method

Creates AsyncLogEventInfo from this LogEventInfo by attaching the specified asynchronous continuation.
public WithContinuation ( AsyncContinuation asyncContinuation ) : NLog.Common.AsyncLogEventInfo
asyncContinuation AsyncContinuation The asynchronous continuation.
return NLog.Common.AsyncLogEventInfo

Property Details

ZeroDate public_oe static_oe property

Gets the date of the first log event created.
public static DateTime,System ZeroDate
return System.DateTime