Click or drag to resize

LogEventBuilder Structure

A fluent builder for logging events to NLog.

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax
public struct LogEventBuilder

The LogEventBuilder type exposes the following members.

Constructors
  NameDescription
Public methodLogEventBuilder(ILogger)
Initializes a new instance of the LogEventBuilder class.
Public methodLogEventBuilder(ILogger, LogLevel)
Initializes a new instance of the LogEventBuilder class.
Top
Properties
  NameDescription
Public propertyLogEvent
Logging event that will be written
Public propertyLogger
The logger to write the log event to
Top
Methods
  NameDescription
Public methodCallsite
Writes the log event to the underlying logger.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public methodException
Sets the exception information of the logging event.
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodLog(Type)
Writes the log event to the underlying logger.
Public methodLog(LogLevel, String, String, Int32)
Writes the log event to the underlying logger.
Public methodMessage(String)
Sets the log message on the logging event.
Public methodMessage(String, Object)
Sets the log message and parameters for formatting on the logging event.
Public methodMessage(IFormatProvider, String, Object)
Sets the log message and parameters for formatting on the logging event.
Public methodMessageTArgument(String, TArgument)
Sets the log message and parameters for formatting for the logging event.
Public methodMessageTArgument1, TArgument2(String, TArgument1, TArgument2)
Sets the log message and parameters for formatting on the logging event.
Public methodMessageTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Sets the log message and parameters for formatting on the logging event.
Public methodProperties
Sets multiple per-event context properties on the logging event.
Public methodPropertyT
Sets a per-event context property on the logging event.
Public methodTimeStamp
Sets the timestamp of the logging event.
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Top
See Also