Click or drag to resize
LogBuilder Class
A fluent class to build log events for NLog.
Inheritance Hierarchy
SystemObject
  NLog.FluentLogBuilder

Namespace: NLog.Fluent
Assembly: NLog (in NLog.dll) Version: 4.3.0
Syntax
public class LogBuilder

The LogBuilder type exposes the following members.

Constructors
  NameDescription
Public methodLogBuilder(ILogger)
Initializes a new instance of the LogBuilder class.
Public methodLogBuilder(ILogger, LogLevel)
Initializes a new instance of the LogBuilder class.
Top
Properties
  NameDescription
Public propertyLogEventInfo
Gets the LogEventInfo created by the builder.
Top
Methods
  NameDescription
Public methodException
Sets the exception information of the logging event.
Public methodLevel
Sets the level of the logging event.
Public methodLoggerName
Sets the logger name of the logging event.
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(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 methodMessage(String, Object, Object)
Sets the log message and parameters for formatting on the logging event.
Public methodMessage(String, Object, Object, Object)
Sets the log message and parameters for formatting on the logging event.
Public methodMessage(String, Object, Object, Object, Object)
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 methodProperty
Sets a per-event context property on the logging event.
Public methodStackTrace
Sets the stack trace for the event info.
Public methodTimeStamp
Sets the timestamp of the logging event.
Public methodWrite
Writes the log event to the underlying logger.
Public methodWriteIf(Boolean, String, String, Int32)
Writes the log event to the underlying logger if the condition is true.
Public methodWriteIf(FuncBoolean, String, String, Int32)
Writes the log event to the underlying logger if the condition delegate is true.
Top
See Also