Click or drag to resize

NLog Namespace

Logging interface, context classes
Classes
  ClassDescription
Public classGlobalDiagnosticsContext
Global Diagnostics Context - a dictionary structure to hold per-application-instance values.
Public classILoggerExtensions
Extensions for NLog ILogger.
Public classLayoutTypedExtensions
Public classLogEventInfo
Represents the logging event.
Public classLogFactory
Creates and manages instances of Logger objects.
Public classLogFactoryT
Specialized LogFactory that can return instances of custom logger types.
Public classLogger
Provides logging interface and utility functions.
Public classLogLevel
Defines available log levels.
Public classLogManager
Creates and manages instances of Logger objects.
Public classMappedDiagnosticsContext Obsolete.
Obsolete and replaced by ScopeContext with NLog v5. Mapped Diagnostics Context (MDC) is a dictionary of keys and values. Stores the dictionary in the thread-local static variable, and provides methods to output dictionary values in layouts.
Public classMappedDiagnosticsLogicalContext Obsolete.
Obsolete and replaced by ScopeContext with NLog v5. Mapped Diagnostics Logical Context (MDLC) is a dictionary of keys and values. Stores the dictionary in the logical thread callcontext, and provides methods to output dictionary values in layouts. Allows for maintaining state across asynchronous tasks and call contexts.
Public classMessageTemplateFormatMethodAttribute
Mark a parameter of a method for message templating
Public classNestedDiagnosticsContext Obsolete.
Obsolete and replaced by ScopeContext with NLog v5. Nested Diagnostics Context (NDC) is a stack of nested values. Stores the stack in the thread-local static variable, and provides methods to output the values in layouts.
Public classNestedDiagnosticsLogicalContext Obsolete.
Obsolete and replaced by ScopeContext with NLog v5. Nested Diagnostics Logical Context (NDLC) is a stack of nested values. Stores the stack in the logical thread callcontexte, and provides methods to output the values in layouts.
Public classNLogConfigurationException
Exception thrown during NLog configuration.
Public classNLogRuntimeException
Exception thrown during log event processing.
Public classNLogTraceListener
TraceListener which routes all messages through NLog.
Public classNullLogger
It works as a normal Logger but it discards all messages which an application requests to be logged. It effectively implements the "Null Object" pattern for Logger objects.
Public classScopeContext
ScopeContext stores state in the async thread execution context. All LogEvents created within a scope can include the scope state in the target output. The logical context scope supports both scope-properties and scope-nested-state-stack (Similar to log4j2 ThreadContext)
Public classSetupBuilderExtensions
Extension methods to setup LogFactory options
Public classSetupExtensionsBuilderExtensions
Extension methods to setup NLog extensions, so they are known when loading NLog LoggingConfiguration
Public classSetupInternalLoggerBuilderExtensions
Extension methods to setup NLog InternalLogger options
Public classSetupLoadConfigurationExtensions
Extension methods to setup NLog LoggingConfiguration
Public classSetupLogFactoryBuilderExtensions
Extension methods to setup general option before loading NLog LoggingConfiguration
Public classSetupSerializationBuilderExtensions
Extension methods to setup NLog extensions, so they are known when loading NLog LoggingConfiguration
Structures
  StructureDescription
Public structureLogEventBuilder
A fluent builder for logging events to NLog.
Interfaces
  InterfaceDescription
Public interfaceIJsonConverter
Interface for serialization of object values into JSON format
Public interfaceILogger
Provides logging interface and utility functions.
Public interfaceIValueFormatter
Render a message template property to a string
Delegates
  DelegateDescription
Public delegateLogMessageFormatter
Generates a formatted message from the log event
Public delegateLogMessageGenerator
Returns a log message. Used to defer calculation of the log message until it's actually needed.