NLog Indicates that the value of the marked element could be null sometimes, so checking for null is required before its usage. [CanBeNull] object Test() => null; void UseTest() { var p = Test(); var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' } Indicates that the value of the marked element can never be null. [NotNull] object Foo() { return null; // Warning: Possible 'null' assignment } Indicates that the marked method builds string by the format pattern and (optional) arguments. The parameter, which contains the format string, should be given in the constructor. The format string should be in -like form. [StringFormatMethod("message")] void ShowError(string message, params object[] args) { /* do something */ } void Foo() { ShowError("Failed: {0}"); // Warning: Non-existing argument in format string } Specifies which parameter of an annotated method should be treated as the format string Indicates that the marked parameter is a message template where placeholders are to be replaced by the following arguments in the order in which they appear void LogInfo([StructuredMessageTemplate]string message, params object[] args) { /* do something */ } void Foo() { LogInfo("User created: {username}"); // Warning: Non-existing argument in format string } Describes dependency between method input and output.

Function Definition Table syntax:

FDT ::= FDTRow [;FDTRow]* FDTRow ::= Input => Output | Output <= Input Input ::= ParameterName: Value [, Input]* Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} Value ::= true | false | null | notnull | canbenull If the method has a single input parameter, its name could be omitted.
Using halt (or void/nothing, which is the same) for the method output means that the method doesn't return normally (throws or terminates the process).
Value canbenull is only applicable for output parameters.
You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by the semicolon. There is no notion of order rows, all rows are checked for applicability and applied per each program state tracked by the analysis engine.
[ContractAnnotation("=> halt")] public void TerminationMethod() [ContractAnnotation("null <= param:null")] // reverse condition syntax public string GetName(string surname) [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() // A method that returns null if the parameter is null, // and not null if the parameter is not null [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) [ContractAnnotation("=> true, result: notnull; => false, result: null")] public bool TryParse(string s, out Person result)
Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), so this symbol will be ignored by usage-checking inspections.
You can use and to configure how this attribute is applied.
[UsedImplicitly] public class TypeConverter {} public class SummaryData { [UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)] public SummaryData() {} } [UsedImplicitly(ImplicitUseTargetFlags.WithInheritors | ImplicitUseTargetFlags.Default)] public interface IService {}
Can be applied to attributes, type parameters, and parameters of a type assignable from . When applied to an attribute, the decorated attribute behaves the same as . When applied to a type parameter or to a parameter of type , indicates that the corresponding type is used implicitly. Specifies the details of implicitly used symbol when it is marked with or . Only entity marked with attribute considered used. Indicates implicit assignment to a member. Indicates implicit instantiation of a type with fixed constructor signature. That means any unused constructor parameters won't be reported as such. Indicates implicit instantiation of a type. Specifies what is considered to be used implicitly when marked with or . Members of the type marked with the attribute are considered used. Inherited entities are considered used. Entity marked with the attribute and all its members considered used. Asynchronous continuation delegate - function invoked at the end of asynchronous processing. Exception during asynchronous processing or null if no exception was thrown. Helpers for asynchronous operations. Iterates over all items in the given collection and runs the specified action in sequence (each action executes only after the preceding one has completed without an error). Type of each item. The items to iterate. The asynchronous continuation to invoke once all items have been iterated. The action to invoke for each item. Repeats the specified asynchronous action multiple times and invokes asynchronous continuation at the end. The repeat count. The asynchronous continuation to invoke at the end. The action to invoke. Modifies the continuation by pre-pending given action to execute just before it. The async continuation. The action to pre-pend. Continuation which will execute the given action before forwarding to the actual continuation. Attaches a timeout to a continuation which will invoke the continuation when the specified timeout has elapsed. The asynchronous continuation. The timeout. Wrapped continuation. Iterates over all items in the given collection and runs the specified action in parallel (each action executes on a thread from thread pool). Type of each item. The items to iterate. The asynchronous continuation to invoke once all items have been iterated. The action to invoke for each item. Runs the specified asynchronous action synchronously (blocks until the continuation has been invoked). The action. Using this method is not recommended because it will block the calling thread. Wraps the continuation with a guard which will only make sure that the continuation function is invoked only once. The asynchronous continuation. Wrapped asynchronous continuation. Gets the combined exception from all exceptions in the list. The exceptions. Combined exception or null if no exception was thrown. Disposes the Timer, and waits for it to leave the Timer-callback-method The Timer object to dispose Timeout to wait (TimeSpan.Zero means dispose without waiting) Timer disposed within timeout (true/false) Asynchronous action. Continuation to be invoked at the end of action. Asynchronous action with one argument. Type of the argument. Argument to the action. Continuation to be invoked at the end of action. Represents the logging event with asynchronous continuation. Initializes a new instance of the struct. The log event. The continuation. Gets the log event. Gets the continuation. Implements the operator ==. The event info1. The event info2. The result of the operator. Implements the operator ==. The event info1. The event info2. The result of the operator. String Conversion Helpers Converts input string value into . Parsing is case-insensitive. Input value Output value Default value Returns if the input value could not be parsed Converts input string value into . Parsing is case-insensitive. Input value The type of the enum Output value. Null if parse failed Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive. The return value indicates whether the conversion succeeded. The enumeration type to which to convert value. The string representation of the enumeration name or underlying value to convert. to ignore case; to consider case. When this method returns, result contains an object of type TEnum whose value is represented by value if the parse operation succeeds. If the parse operation fails, result contains the default value of the underlying type of TEnum. Note that this value need not be a member of the TEnum enumeration. This parameter is passed uninitialized. if the value parameter was converted successfully; otherwise, . Wrapper because Enum.TryParse is not present in .net 3.5 Enum.TryParse implementation for .net 3.5 Don't uses reflection Enables to extract extra context details for Name of context The current LogFactory next to LogManager Handle Internal LogEvent written to the InternalLogger Never use/call NLog Logger-objects when handling these internal events, as it will lead to deadlock / stackoverflow. Internal LogEvent details from The rendered message The log level The exception. Could be null. The type that triggered this internal log event, for example the FileTarget. This property is not always populated. The context name that triggered this internal log event, for example the name of the Target. This property is not always populated. NLog internal logger. Writes to file, console or custom text writer (see ) Documentation on NLog Wiki Gets a value indicating whether internal log includes Trace messages. Gets a value indicating whether internal log includes Debug messages. Gets a value indicating whether internal log includes Info messages. Gets a value indicating whether internal log includes Warn messages. Gets a value indicating whether internal log includes Error messages. Gets a value indicating whether internal log includes Fatal messages. Logs the specified message without an at the Trace level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. Log message. Logs the specified message without an at the Trace level. will be only called when logging is enabled for level Trace. Function that returns the log message. Logs the specified message with an at the Trace level. Exception to be logged. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. The type of the first argument. Message which may include positional parameters. Argument {0} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. The type of the third argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Argument {2} to the message. Logs the specified message with an at the Trace level. Exception to be logged. Log message. Logs the specified message with an at the Trace level. will be only called when logging is enabled for level Trace. Exception to be logged. Function that returns the log message. Logs the specified message without an at the Debug level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Debug level. Log message. Logs the specified message without an at the Debug level. will be only called when logging is enabled for level Debug. Function that returns the log message. Logs the specified message with an at the Debug level. Exception to be logged. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. The type of the first argument. Message which may include positional parameters. Argument {0} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. The type of the third argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Argument {2} to the message. Logs the specified message with an at the Debug level. Exception to be logged. Log message. Logs the specified message with an at the Debug level. will be only called when logging is enabled for level Debug. Exception to be logged. Function that returns the log message. Logs the specified message without an at the Info level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Info level. Log message. Logs the specified message without an at the Info level. will be only called when logging is enabled for level Info. Function that returns the log message. Logs the specified message with an at the Info level. Exception to be logged. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. The type of the first argument. Message which may include positional parameters. Argument {0} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. The type of the third argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Argument {2} to the message. Logs the specified message with an at the Info level. Exception to be logged. Log message. Logs the specified message with an at the Info level. will be only called when logging is enabled for level Info. Exception to be logged. Function that returns the log message. Logs the specified message without an at the Warn level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Warn level. Log message. Logs the specified message without an at the Warn level. will be only called when logging is enabled for level Warn. Function that returns the log message. Logs the specified message with an at the Warn level. Exception to be logged. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. The type of the first argument. Message which may include positional parameters. Argument {0} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. The type of the third argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Argument {2} to the message. Logs the specified message with an at the Warn level. Exception to be logged. Log message. Logs the specified message with an at the Warn level. will be only called when logging is enabled for level Warn. Exception to be logged. Function that returns the log message. Logs the specified message without an at the Error level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Error level. Log message. Logs the specified message without an at the Error level. will be only called when logging is enabled for level Error. Function that returns the log message. Logs the specified message with an at the Error level. Exception to be logged. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. The type of the first argument. Message which may include positional parameters. Argument {0} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. The type of the third argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Argument {2} to the message. Logs the specified message with an at the Error level. Exception to be logged. Log message. Logs the specified message with an at the Error level. will be only called when logging is enabled for level Error. Exception to be logged. Function that returns the log message. Logs the specified message without an at the Fatal level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Fatal level. Log message. Logs the specified message without an at the Fatal level. will be only called when logging is enabled for level Fatal. Function that returns the log message. Logs the specified message with an at the Fatal level. Exception to be logged. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the Trace level. The type of the first argument. Message which may include positional parameters. Argument {0} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Logs the specified message without an at the Trace level. The type of the first argument. The type of the second argument. The type of the third argument. Message which may include positional parameters. Argument {0} to the message. Argument {1} to the message. Argument {2} to the message. Logs the specified message with an at the Fatal level. Exception to be logged. Log message. Logs the specified message with an at the Fatal level. will be only called when logging is enabled for level Fatal. Exception to be logged. Function that returns the log message. Set the config of the InternalLogger with defaults and config. Gets or sets the minimal internal log level. If set to , then messages of the levels , and will be written. Gets or sets a value indicating whether internal messages should be written to the console output stream. Your application must be a console application. Gets or sets a value indicating whether internal messages should be written to the console error stream. Your application must be a console application. Gets or sets the file path of the internal log file. A value of value disables internal logging to a file. Gets or sets the text writer that will receive internal logs. Internal LogEvent written to the InternalLogger EventHandler will only be triggered for events, where severity matches the configured . Never use/call NLog Logger-objects when handling these internal events, as it will lead to deadlock / stackoverflow. Gets or sets a value indicating whether timestamp should be included in internal log output. Is there an thrown when writing the message? Logs the specified message without an at the specified level. Log level. Message which may include positional parameters. Arguments to the message. Logs the specified message without an at the specified level. Log level. Log message. Logs the specified message without an at the specified level. will be only called when logging is enabled for level . Log level. Function that returns the log message. Logs the specified message with an at the specified level. will be only called when logging is enabled for level . Exception to be logged. Log level. Function that returns the log message. Logs the specified message with an at the specified level. Exception to be logged. Log level. Message which may include positional parameters. Arguments to the message. Logs the specified message with an at the specified level. Exception to be logged. Log level. Log message. Write to internallogger. optional exception to be logged. level message optional args for Create log line with timestamp, exception message etc (if configured) Determine if logging should be avoided because of exception type. The exception to check. if logging should be avoided; otherwise, . Determine if logging is enabled for given LogLevel The for the log event. if logging is enabled; otherwise, . Determine if logging is enabled. if logging is enabled; otherwise, . A cyclic buffer of object. Initializes a new instance of the class. Buffer size. Whether buffer should grow as it becomes full. The maximum number of items that the buffer can grow to. Gets the capacity of the buffer Gets the number of items in the buffer Adds the specified log event to the buffer. Log event. The number of items in the buffer. Gets the array of events accumulated in the buffer and clears the buffer as one atomic operation. Events in the buffer. Condition and expression. Initializes a new instance of the class. Left hand side of the AND expression. Right hand side of the AND expression. Gets the left hand side of the AND expression. Gets the right hand side of the AND expression. Returns a string representation of this expression. A concatenated '(Left) and (Right)' string. Evaluates the expression by evaluating and recursively. Evaluation context. The value of the conjunction operator. Exception during evaluation of condition expression. Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). Condition message expression (represented by the exception keyword). Evaluates the current . Evaluation context. The object. Base class for representing nodes in condition expression trees. Documentation on NLog Wiki Converts condition text to a condition expression tree. Condition text to be converted. Condition expression tree. Evaluates the expression. Evaluation context. Expression result. Returns a string representation of the expression. Evaluates the expression. Evaluation context. Expression result. Condition layout expression (represented by a string literal with embedded ${}). Initializes a new instance of the class. The layout. Gets the layout. The layout. Evaluates the expression by rendering the formatted output from the Evaluation context. The output rendered from the layout. Condition level expression (represented by the level keyword). Evaluates to the current log level. Evaluation context. The object representing current log level. Condition literal expression (numeric, LogLevel.XXX, true or false). Initializes a new instance of the class. Literal value. Gets the literal value. The literal value. Evaluates the expression. Evaluation context. Ignored. The literal value as passed in the constructor. Condition logger name expression (represented by the logger keyword). Evaluates to the logger name. Evaluation context. The logger name. Condition message expression (represented by the message keyword). Evaluates to the logger message. Evaluation context. The logger message. Marks class as a log event Condition and assigns a name to it. Initializes a new instance of the class. Condition method name. Gets the method parameters A bunch of utility methods (mostly predicates) which can be used in condition expressions. Partially inspired by XPath 1.0. Compares two values for equality. The first value. The second value. true when two objects are equal, false otherwise. Compares two strings for equality. The first string. The second string. Optional. If true, case is ignored; if false (default), case is significant. true when two strings are equal, false otherwise. Gets or sets a value indicating whether the second string is a substring of the first one. The first string. The second string. Optional. If true (default), case is ignored; if false, case is significant. true when the second string is a substring of the first string, false otherwise. Gets or sets a value indicating whether the second string is a prefix of the first one. The first string. The second string. Optional. If true (default), case is ignored; if false, case is significant. true when the second string is a prefix of the first string, false otherwise. Gets or sets a value indicating whether the second string is a suffix of the first one. The first string. The second string. Optional. If true (default), case is ignored; if false, case is significant. true when the second string is a prefix of the first string, false otherwise. Returns the length of a string. A string whose lengths is to be evaluated. The length of the string. Marks the class as containing condition methods. Condition not expression. Initializes a new instance of the class. The expression. Gets the expression to be negated. The expression. Condition or expression. Initializes a new instance of the class. Left hand side of the OR expression. Right hand side of the OR expression. Gets the left expression. The left expression. Gets the right expression. The right expression. Evaluates the expression by evaluating and recursively. Evaluation context. The value of the alternative operator. Exception during parsing of condition expression. Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). Condition parser. Turns a string representation of condition expression into an expression tree. Initializes a new instance of the class. The string reader. Instance of used to resolve references to condition methods and layout renderers. Parses the specified condition string and turns it into tree. The expression to be parsed. The root of the expression syntax tree which can be used to get the value of the condition in a specified context. Parses the specified condition string and turns it into tree. The expression to be parsed. Instance of used to resolve references to condition methods and layout renderers. The root of the expression syntax tree which can be used to get the value of the condition in a specified context. Parses the specified condition string and turns it into tree. The string reader. Instance of used to resolve references to condition methods and layout renderers. The root of the expression syntax tree which can be used to get the value of the condition in a specified context. Try stringed keyword to success? Parse number negative number? minus should be parsed first. Condition relational (==, !=, <, <=, > or >=) expression. Initializes a new instance of the class. The left expression. The right expression. The relational operator. Gets the left expression. The left expression. Gets the right expression. The right expression. Gets the relational operator. The operator. Compares the specified values using specified relational operator. The first value. The second value. The relational operator. Result of the given relational operator. Promote values to the type needed for the comparison, e.g. parse a string to int. Promotes to type success? Try to promote both values. First try to promote to , when failed, try to . Get the order for the type for comparison. index, 0 to max int. Lower is first Dictionary from type to index. Lower index should be tested first. Build the dictionary needed for the order of the types. Get the string representing the current Relational operators used in conditions. Equality (==). Inequality (!=). Less than (<). Greater than (>). Less than or equal (<=). Greater than or equal (>=). Hand-written tokenizer for conditions. Initializes a new instance of the class. The string reader. Asserts current token type and advances to the next token. Expected token type. If token type doesn't match, an exception is thrown. Asserts that current token is a keyword and returns its value and advances to the next token. Keyword value. Gets or sets a value indicating whether current keyword is equal to the specified value. The keyword. A value of if current keyword is equal to the specified value; otherwise, . Gets or sets a value indicating whether the tokenizer has reached the end of the token stream. A value of if the tokenizer has reached the end of the token stream; otherwise, . Gets or sets a value indicating whether current token is a number. A value of if current token is a number; otherwise, . Gets or sets a value indicating whether the specified token is of specified type. The token type. A value of if current token is of specified type; otherwise, . Gets the next token and sets and properties. Try the comparison tokens (greater, smaller, greater-equals, smaller-equals) current char is match Try the logical tokens (and, or, not, equals) current char is match Mapping between characters and token types for punctuations. Initializes a new instance of the CharToTokenType struct. The character. Type of the token. Token types for condition expressions. Marks the class or a member as advanced. Advanced classes and members are hidden by default in generated documentation. Initializes a new instance of the class. Identifies that the output of layout or layout render does not change for the lifetime of the current appdomain. Implementors must have the [ThreadAgnostic] attribute A layout(renderer) could be converted to a literal when: - The layout and all layout properties are SimpleLayout or [AppDomainFixedOutput] Recommendation: Apply this attribute to a layout or layout-renderer which have the result only changes by properties of type Layout. Used to mark configurable parameters which are arrays. Specifies the mapping between XML elements and .NET types. Initializes a new instance of the class. The type of the array item. The XML element name that represents the item. Gets the .NET type of the array item. Gets the XML element name. Gets all usable exported types from the given assembly. Assembly to scan. Usable types from the given assembly. Types which cannot be loaded are skipped. Load from url file or path, including .dll basepath, optional Load from url Provides logging interface and utility functions. Represents NLog ConfigSection for loading from app.config / web.config <configSections> <section name="NLog" type="NLog.Config.ConfigSectionHandler, NLog" /> </configSections> Gets the default object by parsing the application configuration file (app.exe.config). Overriding base implementation to just store of the relevant app.config section. The XmlReader that reads from the configuration file. to serialize only the collection key properties; otherwise, . Override base implementation to return a object for instead of the instance. A instance, that has been deserialized from app.config. Provides registration information for named items (targets, layouts, layout renderers, etc.) Supports creating item-instance from their type-alias, when parsing NLog configuration Initializes a new instance of the class. Gets or sets default singleton instance of . This property implements lazy instantiation so that the is not built before the internal logger is configured. Gets the factory. Gets the factory. Gets the factory. Gets the ambient property factory. Gets the factory. Gets the factory. Obsolete and replaced by with NLog v5.2. Gets or sets the JSON serializer to use with Perform message template parsing and formatting of LogEvent messages (True = Always, False = Never, Null = Auto Detect) - (Auto Detect) : NLog-parser checks for positional parameters, and will then fallback to string.Format-rendering. - : Always performs the parsing of and rendering of using the NLog-parser (Allows custom formatting with ) - : Always performs parsing and rendering using string.Format (Fastest if not using structured logging) Obsolete since dynamic assembly loading is not compatible with publish as trimmed application. Registers named items from the assembly. The assembly. Obsolete since dynamic assembly loading is not compatible with publish as trimmed application. Registers named items from the assembly. The assembly. Item name prefix. Clears the contents of all factories. Obsolete since dynamic type loading is not compatible with publish as trimmed application. Registers the type. The type to register. The item name prefix. Attribute used to mark the default parameters for layout renderers. Initializes a new instance of the class. Dynamic filtering with a positive list of enabled levels Dynamic filtering with a minlevel and maxlevel range Format of the exception output to the specific target. Appends the Message of an Exception to the specified target. Appends the type of an Exception to the specified target. Appends the short type of an Exception to the specified target. Appends the result of calling ToString() on an Exception to the specified target. Appends the method name from Exception's stack trace to the specified target. Appends the stack trace from an Exception to the specified target. Appends the contents of an Exception's Data property to the specified target. Destructure the exception (usually into JSON) Appends the from the application or the object that caused the error. Appends the from the application or the object that caused the error. Appends any additional properties that specific type of Exception might have. Factory for class-based items. The base type of each item. The type of the attribute used to annotate items. Registers the type. The type to register. The item name prefix. Registers the item based on a type name. Name of the item. Name of the type. Clears the contents of the factory. Factory specialized for s. Register a layout renderer with a callback function. Name of the layoutrenderer, without ${}. the renderer that renders the value. Factory of named items (such as , , , etc.). Factory of named items (such as , , , etc.). Tries to create an item instance with type-alias if instance was created successfully, otherwise. Include context properties Gets or sets the option to include all properties from the log events Gets or sets whether to include the contents of the properties-dictionary. Gets or sets whether to include the contents of the nested-state-stack. Implemented by objects which support installation and uninstallation. Performs installation which requires administrative permissions. The installation context. Performs uninstallation which requires administrative permissions. The installation context. Determines whether the item is installed. The installation context. Value indicating whether the item is installed or null if it is not possible to determine. Interface for accessing configuration details Name of this configuration element Configuration Key/Value Pairs Child configuration elements Interface for loading NLog Finds and loads the NLog configuration LogFactory that owns the NLog configuration Name of NLog.config file (optional) NLog configuration (or null if none found) Get file paths (including filename) for the possible NLog config files. Name of NLog.config file (optional) The file paths to the possible config file Level enabled flags for each LogLevel ordinal Converts the filter into a simple Provides context for install/uninstall operations. Mapping between log levels and console output colors. Initializes a new instance of the class. Initializes a new instance of the class. The log output. Gets or sets the installation log level. Gets or sets a value indicating whether to ignore failures during installation. Whether installation exceptions should be rethrown. If IgnoreFailures is set to true, this property has no effect (there are no exceptions to rethrow). Gets the installation parameters. Gets or sets the log output. Logs the specified trace message. The message. The arguments. Logs the specified debug message. The message. The arguments. Logs the specified informational message. The message. The arguments. Logs the specified warning message. The message. The arguments. Logs the specified error message. The message. The arguments. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Creates the log event which can be used to render layouts during install/uninstall. Log event info object. Convert object-value into specified type Parses the input value and converts into the wanted type Input Value Wanted Type Format to use when parsing Culture to use when parsing Output value with wanted type Interface for fluent setup of LogFactory options LogFactory under configuration Interface for fluent setup of LoggingRules for LoggingConfiguration LoggingRule being built Interface for fluent setup of target for LoggingRule LoggingConfiguration being built LogFactory under configuration Collection of targets that should be written to Interface for fluent setup of LogFactory options for extension loading LogFactory under configuration Interface for fluent setup of LogFactory options for enabling NLog LogFactory under configuration Interface for fluent setup of LoggingConfiguration for LogFactory LogFactory under configuration LoggingConfiguration being built Interface for fluent setup of LogFactory options LogFactory under configuration Interface for fluent setup of LogFactory options for logevent serialization LogFactory under configuration Allows components to request stack trace information to be provided in the . Gets the level of stack trace information required by the implementing class. Encapsulates and the logic to match the actual logger name All subclasses defines immutable objects. Concrete subclasses defines various matching rules through Creates a concrete based on . Rules used to select the concrete implementation returned: if is null => returns (never matches) if doesn't contains any '*' nor '?' => returns (matches only on case sensitive equals) if == '*' => returns (always matches) if doesn't contain '?' if contains exactly 2 '*' one at the beginning and one at the end (i.e. "*foobar*) => returns if contains exactly 1 '*' at the beginning (i.e. "*foobar") => returns if contains exactly 1 '*' at the end (i.e. "foobar*") => returns returns It may include one or more '*' or '?' wildcards at any position. '*' means zero or more occurrences of any character '?' means exactly one occurrence of any character A concrete Returns the argument passed to Checks whether given name matches the logger name pattern. String to be matched. A value of when the name matches, otherwise. Defines a that never matches. Used when pattern is null Defines a that always matches. Used when pattern is '*' Defines a that matches with a case-sensitive Equals Used when pattern is a string without wildcards '?' '*' Defines a that matches with a case-sensitive StartsWith Used when pattern is a string like "*foobar" Defines a that matches with a case-sensitive EndsWith Used when pattern is a string like "foobar*" Defines a that matches with a case-sensitive Contains Used when pattern is a string like "*foobar*" Defines a that matches with a complex wildcards combinations: '*' means zero or more occurrences of any character '?' means exactly one occurrence of any character used when pattern is a string containing any number of '?' or '*' in any position i.e. "*Server[*].Connection[?]" Keeps logging configuration and provides simple API to modify it. This class is thread-safe..ToList() is used for that purpose. Gets the factory that will be configured Initializes a new instance of the class. Initializes a new instance of the class. Gets the variables defined in the configuration or assigned from API Name is case insensitive. Gets a collection of named targets specified in the configuration. A list of named targets. Unnamed targets (such as those wrapped by other targets) are not returned. Gets the collection of file names which should be watched for changes by NLog. Gets the collection of logging rules. Gets or sets the default culture info to use as . Specific culture info or null to use Gets all targets. Inserts NLog Config Variable without overriding NLog Config Variable assigned from API Lookup NLog Config Variable Layout Registers the specified target object. The name of the target is read from . The target object with a non when is Registers the specified target object under a given name. Name of the target. The target object. when is when is Finds the target with the specified name. The name of the target to be found. Found target or when the target is not found. Finds the target with the specified name and specified type. The name of the target to be found. Type of the target Found target or when the target is not found of not of type Add a rule with min- and maxLevel. Minimum log level needed to trigger this rule. Maximum log level needed to trigger this rule. Name of the target to be written when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Add a rule with min- and maxLevel. Minimum log level needed to trigger this rule. Maximum log level needed to trigger this rule. Target to be written to when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Add a rule with min- and maxLevel. Minimum log level needed to trigger this rule. Maximum log level needed to trigger this rule. Target to be written to when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Gets or sets a value indicating whether to quit processing any further rule when this one matches. Add a rule object. rule object to add Add a rule for one loglevel. log level needed to trigger this rule. Name of the target to be written when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Add a rule for one loglevel. log level needed to trigger this rule. Target to be written to when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Add a rule for one loglevel. log level needed to trigger this rule. Target to be written to when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Gets or sets a value indicating whether to quit processing any further rule when this one matches. Add a rule for all loglevels. Name of the target to be written when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Add a rule for all loglevels. Target to be written to when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Add a rule for all loglevels. Target to be written to when the rule matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Gets or sets a value indicating whether to quit processing any further rule when this one matches. Lookup the logging rule with matching The name of the logging rule to be found. Found logging rule or when not found. Removes the specified named logging rule with matching The name of the logging rule to be removed. Found one or more logging rule to remove, or when not found. Loads the NLog LoggingConfiguration from its original source (Ex. read from original config-file after it was updated) A new instance of that represents the updated configuration. Must assign the returned object to LogManager.Configuration to activate it Allow this new configuration to capture state from the old configuration Old config that is about to be replaced Checks KeepVariablesOnReload and copies all NLog Config Variables assigned from API into the new config Notify the configuration when has been assigned / unassigned. LogFactory that configuration has been assigned to. Removes the specified named target. Name of the target. Installs target-specific objects on current system. The installation context. Installation typically runs with administrative permissions. Uninstalls target-specific objects from current system. The installation context. Uninstallation typically runs with administrative permissions. Closes all targets and releases any unmanaged resources. Log to the internal (NLog) logger the information about the and associated with this instance. The information are only recorded in the internal logger if Debug level is enabled, otherwise nothing is recorded. Validates the configuration. Replace a simple variable with a value. The original value is removed and thus we cannot redo this in a later stage. Checks whether unused targets exist. If found any, just write an internal log at Warn level. If initializing not started or failed, then checking process will be canceled Arguments for events. Initializes a new instance of the class. The new configuration. The old configuration. Gets the old configuration. The old configuration. Gets the new configuration. New value can be null when unloading configuration during shutdown. The new configuration. Gets the optional boolean attribute value. Name of the attribute. Default value to return if the attribute is not found or if there is a parse error Boolean attribute value or default. Returns children elements with the specified element name. Remove the namespace (before :) x:a, will be a Enables loading of NLog configuration from a file Get default file paths (including filename) for possible NLog config files. Get default file paths (including filename) for possible NLog config files. Loads NLog configuration from Make sure to update official NLog.xsd schema, when adding new config-options outside targets/layouts Constructor Loads NLog configuration from provided config section Directory where the NLog-config-file was loaded from Builds list with unique keys, using last value of duplicates. High priority keys placed first. Parse loglevel, but don't throw if exception throwing is disabled Name of attribute for logging. Value of parse. Used if there is an exception Parses a single config section within the NLog-config Section was recognized Parse {Rules} xml element Parse {Logger} xml element Parse boolean Name of the property for logging. value to parse Default value to return if the parse failed Boolean attribute value or default. Config element that's validated and having extra context Explicit cast because NET35 doesn't support covariance. Represents a logging rule. An equivalent of <logger /> configuration element. Create an empty . Create an empty . Create a new with a and which writes to . Logger name pattern used for . It may include one or more '*' or '?' wildcards at any position. Minimum log level needed to trigger this rule. Maximum log level needed to trigger this rule. Target to be written to when the rule matches. Create a new with a which writes to . Logger name pattern used for . It may include one or more '*' or '?' wildcards at any position. Minimum log level needed to trigger this rule. Target to be written to when the rule matches. Create a (disabled) . You should call or to enable logging. Logger name pattern used for . It may include one or more '*' or '?' wildcards at any position. Target to be written to when the rule matches. Rule identifier to allow rule lookup Gets a collection of targets that should be written to when this rule matches. Obsolete since too exotic feature with NLog v5.3. Gets a collection of child rules to be evaluated when this rule matches. Gets a collection of filters to be checked before writing to targets. Gets or sets a value indicating whether to quit processing any following rules when this one matches. Gets or sets the whether to quit processing any following rules when lower severity and this one matches. Loggers matching will be restricted to specified minimum level for following rules. Gets or sets logger name pattern. Logger name pattern used by to check if a logger name matches this rule. It may include one or more '*' or '?' wildcards at any position. '*' means zero or more occurrences of any character '?' means exactly one occurrence of any character Gets the collection of log levels enabled by this rule. Obsolete and replaced by with NLog v5. Default action when filters not matching NLog v4.6 introduced the setting with default value . NLog v5 marked it as obsolete and change default value to Default action if none of the filters match NLog v5 changed default value to Enables logging for a particular level. Level to be enabled. Enables logging for a particular levels between (included) and . Minimum log level needed to trigger this rule. Maximum log level needed to trigger this rule. Disables logging for a particular level. Level to be disabled. Disables logging for particular levels between (included) and . Minimum log level to be disables. Maximum log level to be disabled. Enables logging the levels between (included) and . All the other levels will be disabled. Minimum log level needed to trigger this rule. Maximum log level needed to trigger this rule. Returns a string representation of . Used for debugging. Checks whether the particular log level is enabled for this rule. Level to be checked. A value of when the log level is enabled, otherwise. Checks whether given name matches the . String to be matched. A value of when the name matches, otherwise. Default filtering with static level config Factory for locating methods. Registers the type. The type to register. The item name prefix. Scans a type for relevant methods with their symbolic names Include types that are marked with this attribute Include methods that are marked with this attribute Class Type to scan Collection of methods with their symbolic names Clears contents of the factory. Obsolete and replaced by with NLog v5.3. Marks the layout or layout renderer depends on mutable objects from the LogEvent This can be or Attaches a type-alias for an item (such as , , , etc.). Initializes a new instance of the class. The type-alias for use in NLog configuration. Gets the name of the type-alias Indicates NLog should not scan this property during configuration. Initializes a new instance of the class. Marks the object as configuration item for NLog. Initializes a new instance of the class. Failed to resolve the interface of service type Typed we tried to resolve Initializes a new instance of the class. Initializes a new instance of the class. Default implementation of Singleton instance of the serializer. Attribute used to mark the required parameters for targets, layout targets and filters. Interface to register available configuration objects type Registers instance of singleton object for use in NLog Type of service/interface to register Instance of service Gets the service object of the specified type. Avoid calling this while handling a LogEvent, since random deadlocks can occur. Registers singleton-object as implementation of specific interface. If the same single-object implements multiple interfaces then it must be registered for each interface Type of interface The repo Singleton object to use for override Registers the string serializer to use with Repository of interfaces used by NLog to allow override for dependency injection Initializes a new instance of the class. Registered service type in the service repository Initializes a new instance of the class. Type of service that have been registered Type of service-interface that has been registered Obsolete and replaced by with NLog v5.2. Provides simple programmatic configuration API used for trivial logging cases. Warning, these methods will overwrite the current config. Obsolete and replaced by and with NLog v5.2. Configures NLog for console logging so that all messages above and including the level are output to the console. Obsolete and replaced by and with NLog v5.2. Configures NLog for console logging so that all messages above and including the specified level are output to the console. The minimal logging level. Obsolete and replaced by with NLog v5.2. Configures NLog for to log to the specified target so that all messages above and including the level are output. The target to log all messages to. Obsolete and replaced by with NLog v5.2. Configures NLog for to log to the specified target so that all messages above and including the specified level are output. The target to log all messages to. The minimal logging level. Obsolete and replaced by and with NLog v5.2. Configures NLog for file logging so that all messages above and including the level are written to the specified file. Log file name. Obsolete and replaced by and with NLog v5.2. Configures NLog for file logging so that all messages above and including the specified level are written to the specified file. Log file name. The minimal logging level. Value indicating how stack trace should be captured when processing the log event. No Stack trace needs to be captured. Stack trace should be captured. This option won't add the filenames and linenumbers Capture also filenames and linenumbers Capture the location of the call Capture the class name for location of the call Stack trace should be captured. This option won't add the filenames and linenumbers. Stack trace should be captured including filenames and linenumbers. Capture maximum amount of the stack trace information supported on the platform. Marks the layout or layout renderer as thread independent - it producing correct results regardless of the thread it's running on. Without this attribute everything is rendered on the main thread. If this attribute is set on a layout, it could be rendered on the another thread. This could be more efficient as it's skipped when not needed. If context like HttpContext.Current is needed, which is only available on the main thread, this attribute should not be applied. See the AsyncTargetWrapper and BufferTargetWrapper with the , using Apply this attribute when: - The result can we rendered in another thread. Delaying this could be more efficient. And/Or, - The result should not be precalculated, for example the target sends some extra context information. Marks the layout or layout renderer as thread independent - it producing correct results regardless of the thread it's running on. Layout or layout-renderer depends on or , and requires that LogEvent-state is recognized as immutable. Must be used in combination with , else it will have no effect Marks the layout or layout renderer as thread safe - it producing correct results regardless of the number of threads it's running on. Without this attribute then the target concurrency will be reduced Loads NLog LoggingConfiguration from xml-file Make sure to update official NLog.xsd schema, when adding new config-options outside targets/layouts Initializes a new instance of the class. Path to the config-file to read. Initializes a new instance of the class. Path to the config-file to read. The to which to apply any applicable configuration values. Initializes a new instance of the class. Configuration file to be read. Initializes a new instance of the class. Configuration file to be read. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. Initializes a new instance of the class. Configuration file to be read. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. The to which to apply any applicable configuration values. Initializes a new instance of the class. XML reader to read from. Initializes a new instance of the class. XmlReader containing the configuration section. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. Initializes a new instance of the class. XmlReader containing the configuration section. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. The to which to apply any applicable configuration values. Initializes a new instance of the class. NLog configuration as XML string. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. The to which to apply any applicable configuration values. Parse XML string as NLog configuration NLog configuration in XML to be parsed Parse XML string as NLog configuration NLog configuration in XML to be parsed NLog LogFactory Gets or sets a value indicating whether any of the configuration files should be watched for changes and reloaded automatically when changed. Gets the collection of file names which should be watched for changes by NLog. This is the list of configuration files processed. If the autoReload attribute is not set it returns empty collection. Loads the NLog LoggingConfiguration from its original configuration file and returns the new object. The newly loaded instance. Must assign the returned object to LogManager.Configuration to activate it Obsolete and replaced by and with NLog v5.2. Get file paths (including filename) for the possible NLog config files. The file paths to the possible config file Obsolete and replaced by and with NLog v5.2. Overwrite the paths (including filename) for the possible NLog config files. The file paths to the possible config file Obsolete and replaced by and with NLog v5.2. Clear the candidate file paths and return to the defaults. Include new file into the configuration. Check if not already included. Parse the root Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. The default value for the autoReload option. Parse {configuration} xml element. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. The default value for the autoReload option. Parse {NLog} xml element. Path to the config-file that contains the element (to be used as a base for including other files). null is allowed. The default value for the autoReload option. Parses a single config section within the NLog-config Section was recognized Include (multiple) files by filemask, e.g. *.nlog base directory in case if is relative relative or absolute fileMask Represents simple XML element with case-insensitive attribute semantics. Initializes a new instance of the class. The reader to initialize element from. Gets the element name. Gets the dictionary of attribute values. Gets the collection of child elements. Gets the value of the element. Asserts that the name of the element is among specified element names. The allowed names. Special attribute we could ignore Gets the element name. Gets the value of the element. Gets the dictionary of attribute values. Gets the collection of child elements. Special attribute we could ignore Exception thrown during XML parsing Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Matches when the specified condition is met. Conditions are expressed using a simple language. Documentation on NLog Wiki Gets or sets the condition expression. An abstract filter class. Provides a way to eliminate log messages based on properties other than logger name and log level. Initializes a new instance of the class. Gets or sets the action to be taken when filter matches. Gets the result of evaluating filter against given log event. The log event. Filter result. Checks whether log event should be logged or not. Log event. - if the log event should be ignored
- if the filter doesn't want to decide
- if the log event should be logged
.
Marks class as a layout renderer and assigns a name to it. Initializes a new instance of the class. Name of the filter. Filter result. The filter doesn't want to decide whether to log or discard the message. The message should be logged. The message should not be logged. The message should be logged and processing should be finished. The message should not be logged and processing should be finished. A base class for filters that are based on comparing a value to a layout. Initializes a new instance of the class. Gets or sets the layout to be used to filter log messages. The layout. Matches when the calculated layout contains the specified substring. This filter is deprecated in favor of <when /> which is based on conditions. Gets or sets a value indicating whether to ignore case when comparing strings. Gets or sets the substring to be matched. Matches when the calculated layout is equal to the specified substring. This filter is deprecated in favor of <when /> which is based on conditions. Gets or sets a value indicating whether to ignore case when comparing strings. Gets or sets a string to compare the layout to. Matches the provided filter-method Initializes a new instance of the class. Matches when the calculated layout does NOT contain the specified substring. This filter is deprecated in favor of <when /> which is based on conditions. Gets or sets the substring to be matched. Gets or sets a value indicating whether to ignore case when comparing strings. Matches when the calculated layout is NOT equal to the specified substring. This filter is deprecated in favor of <when /> which is based on conditions. Initializes a new instance of the class. Gets or sets a string to compare the layout to. Gets or sets a value indicating whether to ignore case when comparing strings. Matches when the result of the calculated layout has been repeated a moment ago See NLog Wiki Documentation on NLog Wiki How long before a filter expires, and logging is accepted again Max length of filter values, will truncate if above limit Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout. Max number of unique filter values to expect simultaneously Default number of unique filter values to expect, will automatically increase if needed Insert FilterCount value into when an event is no longer filtered Append FilterCount to the when an event is no longer filtered Reuse internal buffers, and doesn't have to constantly allocate new buffers Default buffer size for the internal buffers Checks whether log event should be logged or not. In case the LogEvent has just been repeated. Log event. - if the log event should be ignored
- if the filter doesn't want to decide
- if the log event should be logged
.
Uses object pooling, and prunes stale filter items when the pool runs dry Remove stale filter-value from the cache, and fill them into the pool for reuse Renders the Log Event into a filter value, that is used for checking if just repeated Repeated LogEvent detected. Checks if it should activate filter-action Filter Value State (mutable) Filter Lookup Key (immutable) Global Diagnostics Context - a dictionary structure to hold per-application-instance values. Sets the value with the specified key in the Global Diagnostics Context (GDC) dictionary Item name. Item value. Sets the value with the specified key in the Global Diagnostics Context (GDC) dictionary Item name. Item value. Gets the value with the specified key in the Global Diagnostics Context (GDC) dictionary Item name. The value of , if defined; otherwise . If the value isn't a already, this call locks the for reading the needed for converting to . Gets the value with the specified key in the Global Diagnostics Context (GDC) dictionary Item name. to use when converting the item's value to a string. The value of as a string, if defined; otherwise . If is null and the value isn't a already, this call locks the for reading the needed for converting to . Gets the value with the specified key in the Global Diagnostics Context (GDC) dictionary Item name. The item value, if defined; otherwise null. Gets all key-names from Global Diagnostics Context (GDC) dictionary A collection of the names of all items in the Global Diagnostics Context. Determines whether the Global Diagnostics Context (GDC) dictionary contains the specified key. Item name. A boolean indicating whether the specified item exists in current thread GDC. Removes the value with the specified key from the Global Diagnostics Context (GDC) dictionary Item name. Clears the content of the Global Diagnostics Context (GDC) dictionary. Interface for serialization of object values into JSON format Serialization of an object into JSON format. The object to serialize to JSON. Output destination. Serialize succeeded (true/false) Auto-generated Logger members for binary compatibility with NLog 1.0. Provides logging interface and utility functions. Writes the diagnostic message at the Trace level. A to be written. Writes the diagnostic message at the Trace level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Trace level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Trace level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format.s Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level. A to be written. Writes the diagnostic message at the Debug level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Debug level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level. A to be written. Writes the diagnostic message at the Info level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Info level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Info level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level. A to be written. Writes the diagnostic message at the Warn level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Warn level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Warn level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level. A to be written. Writes the diagnostic message at the Error level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Error level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Error level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level. A to be written. Writes the diagnostic message at the Fatal level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Fatal level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Fatal level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Gets a value indicating whether logging is enabled for the Trace level. A value of if logging is enabled for the Trace level, otherwise it returns . Gets a value indicating whether logging is enabled for the Debug level. A value of if logging is enabled for the Debug level, otherwise it returns . Gets a value indicating whether logging is enabled for the Info level. A value of if logging is enabled for the Info level, otherwise it returns . Gets a value indicating whether logging is enabled for the Warn level. A value of if logging is enabled for the Warn level, otherwise it returns . Gets a value indicating whether logging is enabled for the Error level. A value of if logging is enabled for the Error level, otherwise it returns . Gets a value indicating whether logging is enabled for the Fatal level. A value of if logging is enabled for the Fatal level, otherwise it returns . Writes the diagnostic message at the Trace level using the specified format provider and format parameters. Writes the diagnostic message at the Trace level. Type of the value. The value to be written. Writes the diagnostic message at the Trace level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Trace level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Trace level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Trace level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Trace level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Trace level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Trace level. Log message. Writes the diagnostic message at the Trace level using the specified parameters. A containing format items. Arguments to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Trace level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Writes the diagnostic message at the Trace level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Trace level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Trace level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Trace level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Trace level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Writes the diagnostic message at the Debug level using the specified format provider and format parameters. Writes the diagnostic message at the Debug level. Type of the value. The value to be written. Writes the diagnostic message at the Debug level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Debug level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Debug level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Debug level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Debug level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level. Log message. Writes the diagnostic message at the Debug level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Debug level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Debug level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Obsolete and replaced by - Writes the diagnostic message and exception at the Debug level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Writes the diagnostic message at the Info level using the specified format provider and format parameters. Writes the diagnostic message at the Info level. Type of the value. The value to be written. Writes the diagnostic message at the Info level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Info level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Info level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Info level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Info level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Info level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Info level. Log message. Writes the diagnostic message at the Info level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message at the Info level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Info level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Info level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Info level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Info level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Obsolete and replaced by - Writes the diagnostic message and exception at the Info level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Writes the diagnostic message at the Warn level using the specified format provider and format parameters. Writes the diagnostic message at the Warn level. Type of the value. The value to be written. Writes the diagnostic message at the Warn level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Warn level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Warn level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Warn level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Warn level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Warn level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Warn level. Log message. Writes the diagnostic message at the Warn level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message at the Warn level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Warn level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Warn level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Warn level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Warn level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Obsolete and replaced by - Writes the diagnostic message and exception at the Warn level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Writes the diagnostic message at the Error level using the specified format provider and format parameters. Writes the diagnostic message at the Error level. Type of the value. The value to be written. Writes the diagnostic message at the Error level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Error level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Error level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Error level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Error level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Error level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Error level. Log message. Writes the diagnostic message at the Error level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message at the Error level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Error level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Error level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Error level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Error level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Obsolete and replaced by - Writes the diagnostic message and exception at the Error level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Writes the diagnostic message at the Fatal level using the specified format provider and format parameters. Writes the diagnostic message at the Fatal level. Type of the value. The value to be written. Writes the diagnostic message at the Fatal level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Fatal level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Fatal level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Fatal level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Fatal level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Fatal level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Fatal level. Log message. Writes the diagnostic message at the Fatal level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message at the Fatal level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Fatal level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Fatal level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Fatal level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the Fatal level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Obsolete and replaced by - Writes the diagnostic message and exception at the Fatal level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Auto-generated Logger members for binary compatibility with NLog 1.0. Obsolete and replaced by with NLog v5.3. Logger with only generic methods (passing 'LogLevel' to methods) and core properties. Writes the diagnostic message at the specified level. The log level. A to be written. Writes the diagnostic message at the specified level. The log level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the specified level using the specified parameters. The log level. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the specified level using the specified parameters. The log level. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Obsolete on the ILogger-interface, instead use with NLog v5.3. Occurs when logger configuration changes. Gets the name of the logger. Obsolete on the ILogger-interface, instead use with NLog v5.3. Gets the factory that created this logger. Gets a value indicating whether logging is enabled for the specified level. Log level to be checked. A value of if logging is enabled for the specified level, otherwise it returns . Writes the specified diagnostic message. Log event. Writes the specified diagnostic message. Type of custom Logger wrapper. Log event. Writes the diagnostic message at the specified level using the specified format provider and format parameters. Writes the diagnostic message at the specified level. Type of the value. The log level. The value to be written. Writes the diagnostic message at the specified level. Type of the value. The log level. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the specified level. The log level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the specified level. The log level. A to be written. Arguments to format. An exception to be logged. Writes the diagnostic message and exception at the specified level. The log level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Arguments to format. An exception to be logged. Writes the diagnostic message at the specified level using the specified parameters and formatting them with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the specified level. The log level. Log message. Writes the diagnostic message at the specified level using the specified parameters. The log level. A containing format items. Arguments to format. Writes the diagnostic message at the specified level using the specified parameter and formatting it with the supplied format provider. The type of the argument. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified parameter. The type of the argument. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the specified level using the specified parameters. The type of the first argument. The type of the second argument. The log level. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the specified level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the specified level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. The log level. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Obsolete and replaced by - Writes the diagnostic message and exception at the specified level. The log level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Obsolete and replaced by - Writes the diagnostic message and exception at the specified level. The log level. A to be written. An exception to be logged. This method was marked as obsolete before NLog 4.3.11 and it may be removed in a future release. Extensions for NLog . Starts building a log event with the specified . The logger to write the log event to. The log level. When not for chaining calls. Starts building a log event at the Trace level. The logger to write the log event to. for chaining calls. Starts building a log event at the Debug level. The logger to write the log event to. for chaining calls. Starts building a log event at the Info level. The logger to write the log event to. for chaining calls. Starts building a log event at the Warn level. The logger to write the log event to. for chaining calls. Starts building a log event at the Error level. The logger to write the log event to. for chaining calls. Starts building a log event at the Fatal level. The logger to write the log event to. for chaining calls. Starts building a log event at the Exception level. The logger to write the log event to. The exception information of the logging event. The for the log event. Defaults to when not specified. for chaining calls. Writes the diagnostic message at the Debug level using the specified format provider and format parameters. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. A logger implementation that will handle the message. The value to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. A logger implementation that will handle the message. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. An exception to be logged. A to be written. Arguments to format. Writes the diagnostic message and exception at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. An exception to be logged. An IFormatProvider that supplies culture-specific formatting information. A to be written. Arguments to format. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. Log message. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameter. Only executed when the DEBUG conditional compilation symbol is set. The type of the argument. A logger implementation that will handle the message. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. A logger implementation that will handle the message. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. The type of the third argument. A logger implementation that will handle the message. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Debug level using the specified format provider and format parameters. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. A logger implementation that will handle the message. The value to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. A logger implementation that will handle the message. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. An exception to be logged. A to be written. Arguments to format. Writes the diagnostic message and exception at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. An exception to be logged. An IFormatProvider that supplies culture-specific formatting information. A to be written. Arguments to format. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. Log message. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A logger implementation that will handle the message. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameter. Only executed when the DEBUG conditional compilation symbol is set. The type of the argument. A logger implementation that will handle the message. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. A logger implementation that will handle the message. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. The type of the third argument. A logger implementation that will handle the message. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message and exception at the specified level. A logger implementation that will handle the message. The log level. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Trace level. A logger implementation that will handle the message. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Debug level. A logger implementation that will handle the message. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Info level. A logger implementation that will handle the message. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Warn level. A logger implementation that will handle the message. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Error level. A logger implementation that will handle the message. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Fatal level. A logger implementation that will handle the message. An exception to be logged. A function returning message to be written. Function is not evaluated if logging is not enabled. Allocates new builder and appends to the provided target builder on dispose Access the new builder allocated Long UNC paths does not allow relative-path-logic using '..', and also cannot be loaded into Uri by XmlReader Abstract calls for the application environment Gets current process name (excluding filename extension, if any). Process exit event. Abstract calls to FileSystem Determines whether the specified file exists. The file to check. Returns the content of the specified text-file The file to load. Helpers for . Logs the assembly version and file version of the given Assembly. The assembly to log. Keeps track of pending operation count, and can notify when pending operation count reaches zero Mark operation has started Mark operation has completed Exception coming from the completed operation [optional] Registers an AsyncContinuation to be called when all pending operations have completed Invoked on completion AsyncContinuation operation Clear o Adds the given assembly which will be skipped when NLog is trying to find the calling method on stack trace. The assembly to skip. Sets the stack trace for the event info. The stack trace. Index of the first user stack frame within the stack trace. Type of the logger or logger wrapper. This is still Logger if it's a subclass of Logger. Sets the details retrieved from the Caller Information Attributes Obsolete and replaced by or ${callsite} with NLog v5.3. Gets the stack frame of the method that did the logging. Gets the number index of the stack frame that represents the user code (not the NLog code). Legacy attempt to skip async MoveNext, but caused source file line number to be lost Gets the entire stack trace. Finds first user stack frame in a stack trace The stack trace of the logging method invocation Type of the logger or logger wrapper. This is still Logger if it's a subclass of Logger. Index of the first user stack frame or 0 if all stack frames are non-user This is only done for legacy reason, as the correct method-name and line-number should be extracted from the MoveNext-StackFrame The stack trace of the logging method invocation Starting point for skipping async MoveNext-frames Skip StackFrame when from hidden Assembly / ClassType Skip StackFrame when type of the logger Memory optimized filtering Passing state too avoid delegate capture and memory-allocations. Internal configuration manager used to read .NET configuration files. Just a wrapper around the BCL ConfigurationManager, but used to enable unit testing. Ensures that IDictionary.GetEnumerator returns DictionaryEntry values Safe way to get environment variables. Helper class for dealing with exceptions. Mark this exception as logged to the . Is this exception logged to the ? if the has been logged to the . Determines whether the exception must be rethrown and logs the error to the if is . Advised to log first the error to the before calling this method. The exception to check. Target Object context of the exception. Target Method context of the exception. if the must be rethrown, otherwise. Determines whether the exception must be rethrown immediately, without logging the error to the . Only used this method in special cases. The exception to check. if the must be rethrown, otherwise. FormatProvider that renders an exception-object as $"{ex.GetType()}: {ex.Message}" Convert object to string value format for conversion. If is null and isn't a already, then the will get a locked by Interface for the wrapper around System.Configuration.ConfigurationManager. Gets the wrapper around ConfigurationManager.AppSettings. Format a log message Perform message template parsing and formatting of LogEvent messages: - = Always - = Never - = Auto Detect Format the message and return LogEvent with message to be formatted formatted message Has the logevent properties? LogEvent with message to be formatted when logevent has no properties to be extracted Appends the logevent message to the provided StringBuilder LogEvent with message to be formatted The to append the formatted message. Get the Raw, unformatted value without stringify Implementors must has the [ThreadAgnostic] attribute Get the raw value The value RawValue supported? Interface implemented by layouts and layout renderers. Renders the value of layout or layout renderer in the context of the specified log event. The log event. String representation of a layout. Supports rendering as string value with limited or no allocations (preferred) Implementors must not have the [AppDomainFixedOutput] attribute Renders the value of layout renderer in the context of the specified log event null if not possible or unknown Supports object initialization and termination. Initializes this instance. Closes this instance. The MessageFormatter delegate When Do not fallback to StringBuilder.Format for positional templates New formatter When Do not fallback to StringBuilder.Format for positional templates The MessageFormatter delegate Render a template to a string. The template. Culture. Parameters for the holes. The String Builder destination. Parameters for the holes. Most-Recently-Used-Cache, that discards less frequently used items on overflow Constructor Maximum number of items the cache will hold before discarding. Attempt to insert item into cache. Key of the item to be inserted in the cache. Value of the item to be inserted in the cache. when the key does not already exist in the cache, otherwise. Lookup existing item in cache. Key of the item to be searched in the cache. Output value of the item found in the cache. when the key is found in the cache, otherwise. Watches multiple files at the same time and raises an event whenever a single change is detected in any of those files. The types of changes to watch for. Occurs when a change is detected in one of the monitored files. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Stops watching all files. Watches the specified files for changes. The file names. Scans (breadth-first) the object graph following all the edges whose are instances have attached and returns all objects implementing a specified interfaces. Finds the objects which have attached which are reachable from any of the given root objects when traversing the object graph over public properties. Type of the objects to return. Configuration Reflection Helper Also search the properties of the wanted objects. The root objects. Ordered list of objects implementing T. Object Path to check Converts object into a List of property-names and -values using reflection Try get value from , using , and set into Scans properties for name (Skips property value lookup until finding match) Scans properties for name Binder for retrieving value of Combine paths basepath, not null optional dir optional file Cached directory separator char array to avoid memory allocation on each method call. Trims directory separators from the path path, could be null never null Detects the platform the NLog is running on. Gets the current runtime OS. Gets a value indicating whether current OS is Win32-based (desktop or mobile). Gets a value indicating whether current OS is Unix-based. Gets a value indicating whether current runtime is Mono-based Dictionary that combines the standard with the MessageTemplate-properties extracted from the . The are returned as the first items in the collection, and in positional order. Value of the property Has property been captured from message-template ? The properties of the logEvent The properties extracted from the message-template Wraps the list of message-template-parameters as IDictionary-interface Message-template-parameters Transforms the list of event-properties into IDictionary-interface Check if the message-template-parameters can be used directly without allocating a dictionary Message-template-parameters Are all parameter names unique (true / false) Attempt to insert the message-template-parameters into an empty dictionary Message-template-parameters The dictionary that initially contains no message-template-parameters Will always throw, as collection is readonly Will always throw, as collection is readonly Will always throw, as collection is readonly Will always throw, as collection is readonly Will always throw, as collection is readonly Will always throw, as collection is readonly Special property-key for lookup without being case-sensitive Property-Key equality-comparer that uses string-hashcode from OrdinalIgnoreCase Enables case-insensitive lookup using Reflection helpers for accessing properties. Get property info Configuration Reflection Helper object which could have property property name on result when success. success. Try parse of string to (Generic) list, comma separated. If there is a comma in the value, then (single) quote the value. For single quotes, use the backslash as escape Reflection helpers. Is this a static class? This is a work around, as Type doesn't have this property. From: https://stackoverflow.com/questions/1175888/determine-if-a-type-is-static Optimized delegate for calling MethodInfo Object instance, use null for static methods. Complete list of parameters that matches the method, including optional/default parameters. Creates an optimized delegate for calling the MethodInfo using Expression-Trees Method to optimize Optimized delegate for invoking the MethodInfo Controls a single allocated AsyncLogEventInfo-List for reuse (only one active user) Controls a single allocated char[]-buffer for reuse (only one active user) Controls a single allocated StringBuilder for reuse (only one active user) Controls a single allocated object for reuse (only one active user) Creates handle to the reusable char[]-buffer for active usage Handle to the reusable item, that can release it again Access the acquired reusable object Controls a single allocated MemoryStream for reuse (only one active user) Supported operating systems. If you add anything here, make sure to add the appropriate detection code to Unknown operating system. Unix/Linux operating systems. Desktop versions of Windows (95,98,ME). Windows NT, 2000, 2003 and future versions based on NT technology. Macintosh Mac OSX Immutable state that combines ScopeContext MDLC + NDLC for Immutable state that combines ScopeContext MDLC + NDLC for Immutable state for ScopeContext Mapped Context (MDLC) Immutable state for ScopeContext Nested State (NDLC) Immutable state for ScopeContext Single Property (MDLC) Immutable state for ScopeContext Multiple Properties (MDLC) Immutable state for ScopeContext handling legacy MDLC + NDLC operations Collection of targets that should be written to Simple character tokenizer. Initializes a new instance of the class. The text to be tokenized. Current position in Full text to be parsed Check current char while not changing the position. Read the current char and change position Get the substring of the Implements a single-call guard around given continuation function. Initializes a new instance of the class. The asynchronous continuation. Continuation function which implements the single-call guard. The exception. HashSet optimized for single item Insert single item on scope start, and remove on scope exit Item to insert in scope Existing hashset to update Force allocation of real hashset-container HashSet EqualityComparer Add item to collection, if it not already exists Item to insert Clear hashset Check if hashset contains item Item exists in hashset (true/false) Remove item from hashset Item removed from hashset (true/false) Copy items in hashset to array Destination array Array offset Create hashset enumerator Enumerator Provides helpers to sort log events and associated continuations. Key selector delegate. The type of the value. The type of the key. Value to extract key information from. Key selected from log event. Performs bucket sort (group by) on an array of items and returns a dictionary for easy traversal of the result set. The type of the value. The type of the key. The inputs. The key selector function. Dictionary where keys are unique input keys, and values are lists of . Performs bucket sort (group by) on an array of items and returns a dictionary for easy traversal of the result set. The type of the value. The type of the key. The inputs. The key selector function. Dictionary where keys are unique input keys, and values are lists of . Performs bucket sort (group by) on an array of items and returns a dictionary for easy traversal of the result set. The type of the value. The type of the key. The inputs. The key selector function. The key comparer function. Dictionary where keys are unique input keys, and values are lists of . Single-Bucket optimized readonly dictionary. Uses normal internally Dictionary if multiple buckets are needed. Avoids allocating a new dictionary, when all items are using the same bucket The type of the key. The type of the value. Non-Allocating struct-enumerator Utilities for dealing with values. Gets the fully qualified name of the class invoking the calling method, including the namespace but not the assembly. StackFrame from the calling method Fully qualified class name Returns the assembly from the provided StackFrame (If not internal assembly) Valid assembly, or null if assembly was internal Returns the classname from the provided StackFrame (If not from internal assembly) Valid class name, or empty string if assembly was internal Helpers for , which is used in e.g. layout renderers. Renders the specified log event context item and appends it to the specified . append to this value to be appended format string. If @, then serialize the value with the Default JsonConverter. provider, for example culture NLog string.Format interface Appends int without using culture, and most importantly without garbage value to append Appends uint without using culture, and most importantly without garbage Credits Gavin Pugh - https://www.gavpugh.com/2010/04/01/xnac-avoiding-garbage-when-working-with-stringbuilder/ value to append Convert DateTime into UTC and format to yyyy-MM-ddTHH:mm:ss.fffffffZ - ISO 8601 Compliant Date Format (Round-Trip-Time) Clears the provider StringBuilder Copies the contents of the StringBuilder to the MemoryStream using the specified encoding (Without BOM/Preamble) StringBuilder source MemoryStream destination Encoding used for converter string into byte-stream Helper char-buffer to minimize memory allocations Copies the contents of the StringBuilder to the destination StringBuilder StringBuilder source StringBuilder destination Scans the StringBuilder for the position of needle character StringBuilder source needle character to search for Index of the first occurrence (Else -1) Scans the StringBuilder for the position of needle character StringBuilder source needle characters to search for Index of the first occurrence (Else -1) Compares the contents of two StringBuilders Correct implementation of that also works when is not the same when content is the same Compares the contents of a StringBuilder and a String when content is the same Append a number and pad with 0 to 2 digits append to this the number Append a number and pad with 0 to 4 digits append to this the number Append a numeric type (byte, int, double, decimal) as string Constructor Max number of items Initial StringBuilder Size Max StringBuilder Size Takes StringBuilder from pool Allow return to pool Releases StringBuilder back to pool at its right place Keeps track of acquired pool item Releases pool item back into pool Helpers for . IsNullOrWhiteSpace, including for .NET 3.5 Replace string with The same reference of nothing has been replaced. Concatenates all the elements of a string array, using the specified separator between each element. The string to use as a separator. is included in the returned string only if has more than one element. An collection that contains the elements to concatenate. A string that consists of the elements in delimited by the string. If is an empty array, the method returns . is . Split a string Split a string, optional quoted value Text to split Character to split the Quote character Escape for the , not escape for the , use quotes for that. Split a string, optional quoted value Text to split Character to split the Quote character Escape for the , not escape for the , use quotes for that. Represents target with a chain of filters which determine whether logging should happen. Initializes a new instance of the class. The target. The filter chain. Default action if none of the filters match. Gets the target. The target. Gets the filter chain. The filter chain. Gets or sets the next item in the chain. The next item in the chain. This is for example the 'target2' logger in writeTo='target1,target2' Gets the stack trace usage. A value that determines stack trace handling. Default action if none of the filters match. Wraps with a timeout. Initializes a new instance of the class. The asynchronous continuation. The timeout. Continuation function which implements the timeout logic. The exception. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. URL Encoding helper. Allow UnreservedMarks instead of ReservedMarks, as specified by chosen RFC Use RFC2396 standard (instead of RFC3986) Should use lowercase when doing HEX escaping of special characters Replace space ' ' with '+' instead of '%20' Skip UTF8 encoding, and prefix special characters with '%u' Escape unicode string data for use in http-requests unicode string-data to be encoded target for the encoded result s for how to perform the encoding Convert the wide-char into utf8-bytes, and then escape Is allowed? Is a-z / A-Z / 0-9 Helper class for XML removes any unusual unicode characters that can't be encoded into XML Cleans string of any invalid XML chars found unclean string string with only valid XML chars Pretest, small text and not escape needed Converts object value to invariant format, and strips any invalid xml-characters Object value Object value converted to string Converts object value to invariant format (understood by JavaScript) Object value Object value converted to string Converts DateTime to ISO 8601 format in UTC timezone. Converts object value to invariant format (understood by JavaScript) Object value Object TypeCode Check and remove unusual unicode characters from the result string. Object value converted to string XML elements must follow these naming rules: - Element names are case-sensitive - Element names must start with a letter or underscore - Element names can contain letters, digits, hyphens, underscores, and periods - Element names cannot contain spaces A minimal XML reader, because .NET System.Xml.XmlReader doesn't work with AOT Reads a start element. if start element was found. Something unexpected has failed. Skips an end element. The name of the element to skip. if an end element was skipped; otherwise, . Something unexpected has failed. Reads content of an element. The content of the element. Something unexpected has failed. Something unexpected has failed. Consumer of this method should handle safe position. Something unexpected has failed. Something unexpected has failed. Interface for handling object transformation Takes a dangerous (or massive) object and converts into a safe (or reduced) object Null if unknown object, or object cannot be handled Obsolete and replaced by with NLog v5.3. Provides an interface to execute System.Actions without surfacing any exceptions raised for that action. Runs the provided action. If the action throws, the exception is logged at Error level. The exception is not propagated outside of this method. Action to execute. Runs the provided function and returns its result. If an exception is thrown, it is logged at Error level. The exception is not propagated outside of this method; a default value is returned instead. Return type of the provided function. Function to run. Result returned by the provided function or the default value of type in case of exception. Runs the provided function and returns its result. If an exception is thrown, it is logged at Error level. The exception is not propagated outside of this method; a fallback value is returned instead. Return type of the provided function. Function to run. Fallback value to return in case of exception. Result returned by the provided function or fallback value in case of exception. Logs an exception is logged at Error level if the provided task does not run to completion. The task for which to log an error if it does not run to completion. This method is useful in fire-and-forget situations, where application logic does not depend on completion of task. This method is avoids C# warning CS4014 in such situations. Returns a task that completes when a specified task to completes. If the task does not run to completion, an exception is logged at Error level. The returned task always runs to completion. The task for which to log an error if it does not run to completion. A task that completes in the state when completes. Runs async action. If the action throws, the exception is logged at Error level. The exception is not propagated outside of this method. Async action to execute. A task that completes in the state when completes. Runs the provided async function and returns its result. If the task does not run to completion, an exception is logged at Error level. The exception is not propagated outside of this method; a default value is returned instead. Return type of the provided function. Async function to run. A task that represents the completion of the supplied task. If the supplied task ends in the state, the result of the new task will be the result of the supplied task; otherwise, the result of the new task will be the default value of type . Runs the provided async function and returns its result. If the task does not run to completion, an exception is logged at Error level. The exception is not propagated outside of this method; a fallback value is returned instead. Return type of the provided function. Async function to run. Fallback value to return if the task does not end in the state. A task that represents the completion of the supplied task. If the supplied task ends in the state, the result of the new task will be the result of the supplied task; otherwise, the result of the new task will be the fallback value. Render a message template property to a string Serialization of an object, e.g. JSON and append to The object to serialize to string. Parameter Format Parameter CaptureType An object that supplies culture-specific formatting information. Output destination. Serialize succeeded (true/false) Log event context data. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Gets or sets string that will be used to separate key/value pairs. Default: , Gets or sets whether empty property-values should be included in the output. Default: . Empty value is either null or empty string Gets or sets whether to include the contents of the properties-dictionary. Default: Gets or sets the keys to exclude from the output. If omitted, none are excluded. Disables to capture ScopeContext-properties from active thread context Gets or sets how key/value pairs will be formatted. Gets or sets the culture used for rendering. Default: Designates a property of the class as an ambient property. non-ambient: ${uppercase:${level}} ambient : ${level:uppercase} Initializes a new instance of the class. Ambient property name. Used to render the application domain name. See NLog Wiki Documentation on NLog Wiki Create a new renderer Create a new renderer Gets or sets format-string for displaying details. This string is used in where first parameter is and second is Default: Long . How alias names are mapped: Short = {0:00} Long = {0:0000}:{1} Friendly = {1} Render value for Application setting retrieved from App.config or Web.config file. ${appsetting:item=mysetting:default=mydefault} - produces "mydefault" if no appsetting See NLog Wiki Documentation on NLog Wiki The AppSetting item-name [Required] Default: Obsolete and replaced by with NLog v4.6. The AppSetting item-name The default value to render if the AppSetting value is null. Default: Renders the assembly version information for the entry assembly or a named assembly. As this layout renderer uses reflection and version information is unlikely to change during application execution, it is recommended to use it in conjunction with the . See NLog Wiki Documentation on NLog Wiki The (full) name of the assembly. If null, using the entry assembly. Default: Gets or sets the type of assembly version to retrieve. Default: The default value to render if the Version is not available Default: Gets or sets the custom format of the assembly version output. Default: major.minor.build.revision . Supported placeholders are 'major', 'minor', 'build' and 'revision'. For more details Gets the assembly specified by , or entry assembly otherwise Type of assembly version to retrieve. Gets the assembly version. Gets the file version. Gets the product version, extracted from the additional version information. The current application domain's base directory. See NLog Wiki Documentation on NLog Wiki Use base dir of current process. Alternative one can just use ${processdir} Default: Fallback to the base dir of current process, when AppDomain.BaseDirectory is Temp-Path (.NET Core 3 - Single File Publish) Default: Initializes a new instance of the class. Initializes a new instance of the class. Gets or sets the name of the file to be Path.Combine()'d with the directory name. Default: Gets or sets the name of the directory to be Path.Combine()'d with the directory name. Default: The call site source file name. Full callsite See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to include source file path. Default: Gets or sets the number of frames to skip. Default: Logger should capture StackTrace, if it was not provided manually Default: The call site (class name, method name and source information). See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to render the class name. Default: Gets or sets a value indicating whether to render the include the namespace with . Default: Gets or sets a value indicating whether to render the method name. Default: Gets or sets a value indicating whether the method name will be cleaned up if it is detected as an anonymous delegate. Default: Gets or sets a value indicating whether the method and class names will be cleaned up if it is detected as an async continuation (everything after an await-statement inside of an async method). Default: Gets or sets the number of frames to skip. Default: Gets or sets a value indicating whether to render the source file name and line number. Default: Gets or sets a value indicating whether to include source file path. Default: Logger should capture StackTrace, if it was not provided manually Default: The call site source line number. Full callsite See NLog Wiki Documentation on NLog Wiki Gets or sets the number of frames to skip. Default: Logger should capture StackTrace, if it was not provided manually Default: A counter value (increases on each layout rendering). See NLog Wiki Documentation on NLog Wiki Gets or sets the initial value of the counter. Default: Gets or sets the value for incrementing the counter for every layout rendering. Default: Gets or sets the name of the sequence. Different named sequences can have individual values. Default: The current working directory of the application. See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the file to be Path.Combine()'d with the directory name. Default: Gets or sets the name of the directory to be Path.Combine()'d with the directory name. Default: Current date and time. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Gets or sets the culture used for rendering. Default: Gets or sets the date format. Can be any argument accepted by DateTime.ToString(format). Default: yyyy/MM/dd HH:mm:ss.fff Gets or sets a value indicating whether to output UTC time instead of local time. Default: DB null for a database See NLog Wiki Documentation on NLog Wiki The OS dependent directory separator The environment variable. See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the environment variable. [Required] Default: Gets or sets the default value to be used when the environment variable is not set. Default: Thread identity information (username). See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether username should be included. Default: Gets or sets a value indicating whether domain name should be included. Default: Gets or sets the default value to be used when the User is not set. Default: UserUnknown Gets or sets the default value to be used when the Domain is not set. Default: DomainUnknown Log event context data. See . See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the item. [Required] Default: Format string for conversion from object to string. Default: Gets or sets the culture used for rendering. Default: Gets or sets the object-property-navigation-path for lookup of nested property Default: Gets or sets whether to perform case-sensitive property-name lookup Default: Render information of for the exception passed to the logger call See NLog Wiki Documentation on NLog Wiki Gets or sets the key to search the exception Data for [Required] Default: Gets or sets whether to render innermost Exception from Default: Format string for conversion from object to string. Default: Gets or sets the culture used for rendering. Default: Exception information provided through a call to one of the Logger.*Exception() methods. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Gets or sets the format of the output. Must be a comma-separated list of exception properties: Message, Type, ShortType, ToString, Method, StackTrace. This parameter value is case-insensitive. [Required] Default: ToString,Data Gets or sets the format of the output of inner exceptions. Must be a comma-separated list of exception properties: Message, Type, ShortType, ToString, Method, StackTrace. This parameter value is case-insensitive. Default: Gets or sets the separator used to concatenate parts specified in the Format. Default: Gets or sets the separator used to concatenate exception data specified in the Format. Default: ; Gets or sets the maximum number of inner exceptions to include in the output. By default inner exceptions are not enabled for compatibility with NLog 1.0. Default: Gets or sets the separator between inner exceptions. Default: Gets or sets whether to render innermost Exception from Default: Gets or sets whether to collapse exception tree using Default: Gets the formats of the output of inner exceptions to be rendered in target. Appends the Message of an Exception to the specified . The to append the rendered data to. The exception containing the Message to append. Appends the method name from Exception's stack trace to the specified . The to append the rendered data to. The Exception whose method name should be appended. Appends the stack trace from an Exception to the specified . The to append the rendered data to. The Exception whose stack trace should be appended. Appends the result of calling ToString() on an Exception to the specified . The to append the rendered data to. The Exception whose call to ToString() should be appended. Appends the type of an Exception to the specified . The to append the rendered data to. The Exception whose type should be appended. Appends the short type of an Exception to the specified . The to append the rendered data to. The Exception whose short type should be appended. Appends the application source of an Exception to the specified . The to append the rendered data to. The Exception whose source should be appended. Appends the HResult of an Exception to the specified . The to append the rendered data to. The Exception whose HResult should be appended. Appends the contents of an Exception's Data property to the specified . The to append the rendered data to. The Exception whose Data property elements should be appended. Appends all the serialized properties of an Exception into the specified . The to append the rendered data to. The Exception whose properties should be appended. Appends all the additional properties of an Exception like Data key-value-pairs The to append the rendered data to. The Exception whose properties should be appended. Split the string and then compile into list of Rendering formats. A layout renderer which could have different behavior per instance by using a . Initializes a new instance of the class. Name without ${}. Initializes a new instance of the class. Name without ${}. Method that renders the layout. Name used in config without ${}. E.g. "test" could be used as "${test}". Method that renders the layout. Format string for conversion from object to string. Default: Gets or sets the culture used for rendering. Default: Render the value for this log event The logging event. The value. A layout renderer which could have different behavior per instance by using a . Initializes a new instance of the class. Name without ${}. Method that renders the layout. The information about the garbage collector. See NLog Wiki Documentation on NLog Wiki Gets or sets the property to retrieve. Default: Gets or sets the property of System.GC to retrieve. Total memory allocated. Total memory allocated (perform full garbage collection first). Gets the number of Gen0 collections. Gets the number of Gen1 collections. Gets the number of Gen2 collections. Maximum generation number supported by GC. Render a Global Diagnostics Context item. See See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the item. [Required] Default: Format string for conversion from object to string. Default: Gets or sets the culture used for rendering. Default: Globally-unique identifier (GUID). See NLog Wiki Documentation on NLog Wiki Gets or sets the GUID format as accepted by Guid.ToString() method. Default: N Generate the Guid from the NLog LogEvent (Will be the same for all targets) Default: The host name that the process is running on. See NLog Wiki Documentation on NLog Wiki Resolves the hostname from environment-variables with fallback to Tries the lookup value. The lookup function. Type of the lookup. Thread identity information (name and authentication information). See NLog Wiki Documentation on NLog Wiki Gets or sets the separator to be used when concatenating parts of identity information. Default: : Gets or sets a value indicating whether to render Thread.CurrentPrincipal.Identity.Name. Default: Gets or sets a value indicating whether to render Thread.CurrentPrincipal.Identity.AuthenticationType. Default: Gets or sets a value indicating whether to render Thread.CurrentPrincipal.Identity.IsAuthenticated. Default: Lookup parameter value from See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the parameter. [Required] Default: Render environmental information related to logging events. Gets the logging configuration this target is part of. Value formatter Renders the value of layout renderer in the context of the specified log event. The log event. String representation of a layout renderer. Initializes this instance. The configuration. Closes this instance. Renders the value of layout renderer in the context of the specified log event. The log event. The layout render output is appended to builder Renders the value of layout renderer in the context of the specified log event into . The to append the rendered data to. Logging event. Initializes the layout renderer. Closes the layout renderer. Get the for rendering the messages to a LogEvent with culture Culture in on Layout level Get the for rendering the messages to a LogEvent with culture Culture in on Layout level is preferred Obsolete and replaced by with NLog v5.2. Register a custom layout renderer. Short-cut for registering to default Type of the layout renderer. The layout-renderer type-alias for use in NLog configuration - without '${ }' Obsolete and replaced by with NLog v5.2. Register a custom layout renderer. Short-cut for registering to default Type of the layout renderer. The layout-renderer type-alias for use in NLog configuration - without '${ }' Obsolete and replaced by with NLog v5.2. Register a custom layout renderer with a callback function . The callback receives the logEvent. The layout-renderer type-alias for use in NLog configuration - without '${ }' Callback that returns the value for the layout renderer. Obsolete and replaced by with NLog v5.2. Register a custom layout renderer with a callback function . The callback receives the logEvent and the current configuration. The layout-renderer type-alias for use in NLog configuration - without '${ }' Callback that returns the value for the layout renderer. Obsolete and replaced by with NLog v5.2. Register a custom layout renderer with a callback function . The callback receives the logEvent and the current configuration. Renderer with callback func Resolves the interface service-type from the service-repository Marks class as layout-renderer and attaches a type-alias name for use in NLog configuration. Initializes a new instance of the class. The layout-renderer type-alias for use in NLog configuration - without '${ }' Format of the ${level} layout renderer output. Render the LogLevel standard name. Render the first character of the level. Render the first character of the level. Render the ordinal (aka number) for the level. Render the LogLevel full name, expanding Warn / Info abbreviations Render the LogLevel as 3 letter abbreviations (Trc, Dbg, Inf, Wrn, Err, Ftl) The log level. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating the output format of the level. Default: Gets or sets a value indicating whether upper case conversion should be applied. Default: A string literal. This is used to escape '${' sequence as ;${literal:text=${}' See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The literal text value. This is used by the layout compiler. Gets or sets the literal text. A string literal with a fixed raw value Initializes a new instance of the class. The literal text value. Fixed raw value This is used by the layout compiler. The logger name. See NLog Wiki Documentation on NLog Wiki/// Gets or sets a value indicating whether to render short logger name (the part after the trailing dot character). Default: Gets or sets a value indicating whether to render prefix of logger name (the part before the trailing dot character). Default: The date and time in a long, sortable format yyyy-MM-dd HH:mm:ss.ffff. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to output UTC time instead of local time. Default: The machine name that the process is running on. See NLog Wiki Documentation on NLog Wiki The formatted log message. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to log exception along with message. Default: Gets or sets the string that separates message from the exception. Default: | Gets or sets whether it should render the raw message without formatting parameters Default: A newline literal. The directory where NLog.dll is located. See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the file to be Path.Combine()'d with the directory name. Default: Gets or sets the name of the directory to be Path.Combine()'d with the directory name. Default: The executable directory from the FileName, using the current process See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the file to be Path.Combine()'d with the directory name. Default: Gets or sets the name of the directory to be Path.Combine()'d with the directory name. Default: Initializes a new instance of the class. Initializes a new instance of the class. The identifier of the current process. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The information about the running process. See NLog Wiki Documentation on NLog Wiki Gets or sets the property to retrieve. Default: Gets or sets the format string used when converting the property value to a string, when the property supports formatting (e.g., , , or enum types). Default: Gets or sets the culture used for rendering. Default: Property of System.Diagnostics.Process to retrieve. Base Priority. Exit Code. Exit Time. Process Handle. Handle Count. Whether process has exited. Process ID. Machine name. Handle of the main window. Title of the main window. Maximum Working Set. Minimum Working Set. Non-paged System Memory Size. Non-paged System Memory Size (64-bit). Paged Memory Size. Paged Memory Size (64-bit).. Paged System Memory Size. Paged System Memory Size (64-bit). Peak Paged Memory Size. Peak Paged Memory Size (64-bit). Peak Virtual Memory Size. Peak Virtual Memory Size (64-bit).. Peak Working Set Size. Peak Working Set Size (64-bit). Whether priority boost is enabled. Priority Class. Private Memory Size. Private Memory Size (64-bit). Privileged Processor Time. Process Name. Whether process is responding. Session ID. Process Start Time. Total Processor Time. User Processor Time. Virtual Memory Size. Virtual Memory Size (64-bit). Working Set Size. Working Set Size (64-bit). The name of the current process. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to write the full path to the process executable. Default: Initializes a new instance of the class. Initializes a new instance of the class. The process time in format HH:mm:ss.mmm. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to output in culture invariant format Default: Gets or sets the culture used for rendering. Default: Write timestamp to builder with format hh:mm:ss:fff Renders the nested states from like a callstack See NLog Wiki Documentation on NLog Wiki Gets or sets the indent token. Default: Renders the nested states from like a callstack See NLog Wiki Documentation on NLog Wiki Gets or sets the number of top stack frames to be rendered. Default: Gets or sets the number of bottom stack frames to be rendered. Default: Gets or sets the separator to be used for concatenating nested logical context output. Default: Gets or sets how to format each nested state. Ex. like JSON = @ Default: Gets or sets the culture used for rendering. Default: Renders specified property-item from See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the item. [Required] Default: Format string for conversion from object to string. Default: Gets or sets the culture used for rendering. Default: Timing Renderer (Async scope) See NLog Wiki Documentation on NLog Wiki Gets or sets whether to only include the duration of the last scope created Default: Gets or sets whether to just display the scope creation time, and not the duration Default: Gets or sets whether to just display the scope creation time, and not the duration Default: Gets or sets the TimeSpan format. Can be any argument accepted by TimeSpan.ToString(format). When Format has not been specified, then it will render TimeSpan.TotalMilliseconds Default: Gets or sets the culture used for rendering. Default: The sequence ID Marked obsolete with NLog 6.0, instead use ${counter} See NLog Wiki Documentation on NLog Wiki The short date in a sortable format yyyy-MM-dd. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to output UTC time instead of local time. Default: System special folder path from Initializes a new instance of the class. System special folder path from Initializes a new instance of the class. System special folder path (includes My Documents, My Music, Program Files, Desktop, and more). See NLog Wiki Documentation on NLog Wiki Gets or sets the system special folder to use. Full list of options is available at MSDN. The most common ones are:
  • CommonApplicationData - application data for all users.
  • ApplicationData - roaming application data for current user.
  • LocalApplicationData - non roaming application data for current user
  • UserProfile - Profile folder for current user
  • DesktopDirectory - Desktop-directory for current user
  • MyDocuments - My Documents-directory for current user
  • System - System directory
Gets or sets the name of the file to be Path.Combine()'d with the directory name. Default: Gets or sets the name of the directory to be Path.Combine()'d with the directory name. Default: System special folder path from Initializes a new instance of the class. Format of the ${stacktrace} layout renderer output. Raw format (multiline - as returned by StackFrame.ToString() method). Flat format (class and method names displayed in a single line). Detailed flat format (method signatures displayed in a single line). Stack trace renderer. See NLog Wiki Documentation on NLog Wiki Gets or sets the output format of the stack trace. Default: Gets or sets the number of top stack frames to be rendered. Default: Gets or sets the number of frames to skip. Default: Gets or sets the stack frame separator string. Default: => Logger should capture StackTrace, if it was not provided manually Default: Gets or sets whether to render StackFrames in reverse order Default: A temporary directory. See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the file to be Path.Combine()'d with the directory name. Default: Gets or sets the name of the directory to be Path.Combine()'d with the directory name. Default: The identifier of the current thread. See NLog Wiki Documentation on NLog Wiki The name of the current thread. See NLog Wiki Documentation on NLog Wiki The Ticks value of current date and time. See NLog Wiki Documentation on NLog Wiki The time in a 24-hour, sortable format HH:mm:ss.mmmm. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to output UTC time instead of local time. Default: Gets or sets a value indicating whether to output in culture invariant format Default: Gets or sets the culture used for rendering. Default: Render a NLog Configuration variable assigned from API or loaded from config-file See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the NLog variable. [Required] Default: Gets or sets the default value to be used when the variable is not set. Default: Gets the configuration variable layout matching the configured Name Mostly relevant for the scanning of active NLog Layouts (Ex. CallSite capture) Try lookup the configuration variable layout matching the configured Name Applies caching to another layout output. The value of the inner layout will be rendered only once and reused subsequently. See NLog Wiki Documentation on NLog Wiki A value indicating when the cache is cleared. Never clear the cache. Clear the cache whenever the is initialized. Clear the cache whenever the is closed. Gets or sets a value indicating whether this is enabled. Default: Gets or sets a value indicating when the cache is cleared. Default: | Gets or sets whether to reset cached value when CacheKey output changes. Example CacheKey could render current day, so the cached-value is reset on day roll. Default: Gets or sets a value indicating how many seconds the value should stay cached until it expires Default: Filters characters not allowed in the file names by replacing them with safe character. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether to modify the output of this renderer so it can be used as a part of file path (illegal characters are replaced with '_'). Default: Escapes output of another layout using JSON rules. See NLog Wiki Documentation on NLog Wiki Gets or sets whether output should be encoded with Json-string escaping. Default: Gets or sets a value indicating whether to escape non-ascii characters Default: Should forward slashes be escaped? If , / will be converted to \/ Default: Left part of a text See NLog Wiki Documentation on NLog Wiki Gets or sets the length in characters. Zero or negative means disabled. Default: Same as -property, so it can be used as ambient property. Default: ${message:truncate=80} Converts the result of another layout output to lower case. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether lower case conversion should be applied. A value of if lower case conversion should be applied; otherwise, . Same as -property, so it can be used as ambient property. ${level:tolower} Gets or sets the culture used for rendering. Default: Render the non-raw value of an object. For performance and/or full (formatted) control of the output. Gets or sets a value indicating whether to disable the IRawValue-interface Default: Render a single property of a object See NLog Wiki Documentation on NLog Wiki Gets or sets the object-property-navigation-path for lookup of nested property Shortcut for Default: Gets or sets the object-property-navigation-path for lookup of nested property [Required] Default: Format string for conversion from object to string. Default: Gets or sets the culture used for rendering. Default: Lookup property-value from source object based on Could resolve property-value? Only outputs the inner layout when exception has been defined for log message. See NLog Wiki Documentation on NLog Wiki If is not found, print this layout. Default: Outputs alternative layout when the inner layout produces empty result. ${onhasproperties:, Properties\: ${all-event-properties}} See NLog Wiki Documentation on NLog Wiki If is not found, print this layout. Default: Horizontal alignment for padding layout renderers. When layout text is too long, align it to the left (remove characters from the right). When layout text is too long, align it to the right (remove characters from the left). Applies padding to another layout output. See NLog Wiki Documentation on NLog Wiki Gets or sets the number of characters to pad the output to. Default: . Positive padding values cause left padding, negative values cause right padding to the desired width. Gets or sets the padding character. Default: Gets or sets a value indicating whether to trim the rendered text to the absolute value of the padding length. Default: Gets or sets a value indicating whether a value that has been truncated (when is ) will be left-aligned (characters removed from the right) or right-aligned (characters removed from the left). The default is left alignment. Default: Replaces a string in the output of another layout with another string. ${replace:searchFor=foo:replaceWith=bar:inner=${message}} See NLog Wiki Documentation on NLog Wiki Gets or sets the text to search for. [Required] Default: Gets or sets the replacement string. Default: Gets or sets a value indicating whether to ignore case. Default: Gets or sets a value indicating whether to search for whole words Default: Replaces newline characters from the result of another layout renderer with spaces. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating the string that should be used to replace newlines. Default: Gets or sets a value indicating the string that should be used to replace newlines (alias for ) Default: Right part of a text See NLog Wiki Documentation on NLog Wiki Gets or sets the length in characters. Zero or negative means disabled. Default: Decodes text "encrypted" with ROT-13. See https://en.wikipedia.org/wiki/ROT13. See NLog Wiki Documentation on NLog Wiki Gets or sets the layout to be wrapped. The layout to be wrapped. This variable is for backwards compatibility Encodes/Decodes ROT-13-encoded string. The string to be encoded/decoded. Encoded/Decoded text. Encodes/Decodes ROT-13-encoded string. Substring the result ${substring:${level}:start=2:length=2} ${substring:${level}:start=-2:length=2} ${substring:Inner=${level}:start=2:length=2} See NLog Wiki Documentation on NLog Wiki Gets or sets the start index. Default: Gets or sets the length in characters. If null, then the whole string Default: Calculate start position 0 or positive number Calculate needed length 0 or positive number Trims the whitespace from the result of another layout renderer. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether whitespace should be trimmed. Default: Converts the result of another layout output to upper case. ${uppercase:${level}} //[DefaultParameter] ${uppercase:Inner=${level}} ${level:uppercase} // [AmbientProperty] See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether upper case conversion should be applied. Default: Same as -property, so it can be used as ambient property. Default: ${level:toupper} Gets or sets the culture used for rendering. Default: Encodes the result of another layout output for use with URLs. See NLog Wiki Documentation on NLog Wiki Gets or sets a value indicating whether spaces should be translated to '+' or '%20'. Default: Gets or sets a value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs) Default: Gets or sets a value whether escaping be done according to the old NLog style (Very non-standard) Default: Outputs alternative layout when the inner layout produces empty result. Gets or sets the layout to be rendered when Inner-layout produces empty result. Default: Only outputs the inner layout when the specified condition has been met. See NLog Wiki Documentation on NLog Wiki Gets or sets the condition that must be met for the layout to be printed. [Required] Default: If is not met, print this layout. Default: Replaces newline characters from the result of another layout renderer with spaces. Gets or sets the line length for wrapping. Only positive values are allowed. Default: Base class for s which wrapping other s. This has the property (which is default) and can be used to wrap. ${uppercase:${level}} //[DefaultParameter] ${uppercase:Inner=${level}} Gets or sets the wrapped layout. [DefaultParameter] so Inner: is not required if it's the first Default: Appends the rendered output from -layout and transforms the added output (when necessary) Logging event. The to append the rendered data to. Start position for any necessary transformation of . Transforms the output of another layout. Logging event. Output to be transform. Transformed text. Transforms the output of another layout. Output to be transform. Transformed text. Renders the inner layout contents. The log event. Contents of inner layout. Base class for s which wrapping other s. This expects the transformation to work on a Transforms the output of another layout. Output to be transform. Renders the inner layout contents. for the result Converts the result of another layout output to be XML-compliant. See NLog Wiki Documentation on NLog Wiki Gets or sets whether output should be encoded with XML-string escaping. Default: Gets or sets whether output should be wrapped using CDATA section instead of XML-string escaping Default: Gets or sets a value indicating whether to transform newlines (\r\n) into ( ) Default: A layout containing one or more nested layouts. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Gets the inner layouts. A column in the CSV. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The name of the column. The layout of the column. Gets or sets the name of the column. [Required] Default: Gets or sets the layout used for rendering the column value. [Required] Default: Gets or sets the override of Quoting mode Default: . For faster performance then consider and Specifies allowed column delimiters. Automatically detect from regional settings. Comma (ASCII 44). Semicolon (ASCII 59). Tab character (ASCII 9). Pipe character (ASCII 124). Space character (ASCII 32). Custom string, specified by the . A specialized layout that renders CSV-formatted events. If is set, then the header generation with column names will be disabled. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Gets the array of parameters to be passed. Gets or sets a value indicating whether CSV should include header. Default: Gets or sets the column delimiter. Default: Gets or sets the quoting mode. Default: Gets or sets the quote Character. Default: " Gets or sets the custom column delimiter value (valid when is set to ). Default: Get the headers with the column names. Header with column names for CSV layout. Initializes a new instance of the class. The parent. Specifies CSV quoting modes. Quote Always (Fast) Quote nothing (Very fast) Quote only whose values contain the quote symbol or the separator (Slow) A specialized layout that renders LogEvent as JSON-Array See NLog Wiki Documentation on NLog Wiki Gets the array of items to include in JSON-Array Gets or sets the option to suppress the extra spaces in the output json. Default: Gets or sets the option to render the empty object value {} Default: JSON attribute. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The name of the attribute. The layout of the attribute's value. Initializes a new instance of the class. The name of the attribute. The layout of the attribute's value. Encode value with json-encode Gets or sets the name of the attribute. [Required] Default: Gets or sets the layout used for rendering the attribute value. [Required] Default: Gets or sets the result value type, for conversion of layout rendering output Default: Gets or sets the fallback value when result value is not available Default: Gets or sets whether output should be encoded as Json-String-Property, or be treated as valid json. Default: Gets or sets a value indicating whether to escape non-ascii characters Default: Should forward slashes be escaped? If true, / will be converted to \/ Default: Gets or sets whether empty attribute value should be included in the output. Default: . Empty value is either null or empty string A specialized layout that renders JSON-formatted events. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Gets the array of attributes' configurations. Gets or sets the option to suppress the extra spaces in the output json. Default: Gets or sets the option to render the empty object value {} Default: Auto indent and create new lines Default: Gets or sets the option to include all properties from the log event (as JSON) Default: Gets or sets a value indicating whether to include contents of the dictionary. Default: Gets or sets whether to include the contents of the dictionary. Default: Obsolete and replaced by with NLog v5. Gets or sets the option to include all properties from the log event (as JSON) Default: Obsolete and replaced by with NLog v5. Gets or sets a value indicating whether to include contents of the dictionary. Default: Obsolete and replaced by with NLog v5. Gets or sets a value indicating whether to include contents of the dictionary. Default: Gets or sets the option to exclude null/empty properties from the log event (as JSON) Default: List of property names to exclude when is true How far should the JSON serializer follow object references before backing off Default: Should forward slashes be escaped? If , / will be converted to \/ Default: Abstract interface that layouts must implement. Default Layout-value that renders string.Empty Is this layout initialized? See Gets a value indicating whether this layout is thread-agnostic (can be rendered on any thread). Layout is thread-agnostic if it has been marked with [ThreadAgnostic] attribute and all its children are like that as well. Thread-agnostic layouts only use contents of for its output. Gets the level of stack trace information required for rendering. Gets the logging configuration this target is part of. Implicitly converts the specified string as LayoutRenderer-expression into a . Text to be converted. object represented by the text. Parses the specified string as LayoutRenderer-expression into a . The layout string. Instance of .' Parses the specified string as LayoutRenderer-expression into a . The layout string. The NLog factories to use when resolving layout renderers. Instance of . Parses the specified string as LayoutRenderer-expression into a . The layout string. Whether should be thrown on parse errors ( = replace unrecognized tokens with a space). Instance of . Create a containing literal value Create a from a lambda method. Method that renders the layout. Whether method is ThreadAgnostic and doesn't depend on context of the logging application thread. Instance of . Precalculates the layout for the specified log event and stores the result in per-log event cache. Skips context capture when Layout have [ThreadAgnostic], and only contains layouts with [ThreadAgnostic]. The log event. Override this method to make it conditional whether to capture Layout output-value for Renders formatted output using the log event as context. Inside a , is preferred for performance reasons. The logging event. The formatted output as string. Optimized version of that works best when override of is available. The logging event. Appends the formatted output to target Valid default implementation of , when having implemented the optimized The logging event. The rendered layout. Renders formatted output using the log event as context. The logging event. Appends the formatted output to target Initializes this instance. The configuration. Closes this instance. Initializes this instance. The configuration. Closes this instance. Initializes the layout. Closes the layout. Renders formatted output using the log event as context. The logging event. The formatted output. Obsolete and replaced by with NLog v5.2. Register a custom Layout. Short-cut for registering to default Type of the Layout. Name of the Layout. Obsolete and replaced by with NLog v5.2. Register a custom Layout. Short-cut for registering to default Type of the Layout. Name of the Layout. Optimized version of for internal Layouts, when override of is available. Try get value rawValue if return result is if we could not determine the rawValue Resolve from DI Avoid calling this while handling a LogEvent, since random deadlocks can occur Marks class as Layout and attaches a type-alias name for use in NLog configuration. Initializes a new instance of the class. The Layout type-alias for use in NLog configuration. Parses layout strings. Add to Options available for Default options Layout renderer method can handle concurrent threads Layout renderer method is agnostic to current thread context. This means it will render the same result independent of thread-context. A specialized layout that supports header and footer. Gets or sets the body layout (can be repeated multiple times). Gets or sets the header layout. Gets or sets the footer layout. Represents a string with embedded placeholders that can render contextual information. This layout is not meant to be used explicitly. Instead you can just use a string containing layout renderers everywhere the layout is required. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The layout string to parse. Initializes a new instance of the class. The layout string to parse. The NLog factories to use when creating references to layout renderers. Initializes a new instance of the class. The layout string to parse. The NLog factories to use when creating references to layout renderers. Whether should be thrown on parse errors. Original text before parsing as Layout renderes. Gets or sets the layout text that could be parsed. Is the message fixed? (no Layout renderers used) Get the fixed text. Only set when is Is the message a simple formatted string? (Can skip StringBuilder) Gets a collection of objects that make up this layout. Gets a collection of objects that make up this layout. Gets the level of stack trace information required for rendering. Implicitly converts the specified string as LayoutRenderer-expression into a . Text to be converted. A object. Escapes the passed text so that it can be used literally in all places where layout is normally expected without being treated as layout. The text to be escaped. The escaped text. Escaping is done by replacing all occurrences of '${' with '${literal:text=${}' Evaluates the specified text by expanding all layout renderers. The text to be evaluated. Log event to be used for evaluation. The input text with all occurrences of ${} replaced with values provided by the appropriate layout renderers. Evaluates the specified text by expanding all layout renderers in new context. The text to be evaluated. The input text with all occurrences of ${} replaced with values provided by the appropriate layout renderers. Typed Layout for easy conversion from NLog Layout logic to a simple value (ex. integer or enum) Is fixed value? Fixed value Initializes a new instance of the class. Dynamic NLog Layout Initializes a new instance of the class. Dynamic NLog Layout Format used for parsing string-value into result value type Culture used for parsing string-value into result value type Initializes a new instance of the class. Fixed value Render Value Log event for rendering Fallback value when no value available Result value when available, else fallback to defaultValue Renders the value and converts the value into string format Only to implement abstract method from , and only used when calling Create a typed layout from a lambda method. Method that renders the layout. Whether method is ThreadAgnostic and doesn't depend on context of the logging application thread. Instance of typed layout. Implements Equals using Converts a given value to a . Text to be converted. Converts a given text to a . Text to be converted. Implements the operator == using Implements the operator != using Typed Value that is easily configured from NLog.config file Initializes a new instance of the class. Gets or sets the layout used for rendering the value. Gets or sets the result value type, for conversion of layout rendering output Gets or sets the fallback value when result value is not available Gets or sets the fallback value should be null (instead of default value of ) when result value is not available Gets or sets format used for parsing parameter string-value for type-conversion Gets or sets the culture used for parsing parameter string-value for type-conversion Render Result Value Log event for rendering Result value when available, else fallback to defaultValue XML attribute. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The name of the attribute. The layout of the attribute's value. Initializes a new instance of the class. The name of the attribute. The layout of the attribute's value. Encode value with xml-encode Gets or sets the name of the attribute. [Required] Default: Gets or sets the layout used for rendering the attribute value. [Required] Default: Gets or sets the result value type, for conversion of layout rendering output Default: Gets or sets the fallback value when result value is not available Default: Gets or sets whether output should be encoded with Xml-string escaping, or be treated as valid xml-attribute-value Default: Gets or sets whether empty attribute value should be included in the output. Default: . Empty value is either null or empty string A XML Element See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. Name of the element [Required] Default: item Value inside the element Default: Gets or sets the layout used for rendering the XML-element InnerText. Default: Gets or sets whether output should be encoded with XML-string escaping, or be treated as valid xml-element-value Default: Gets or sets whether output should be wrapped using CDATA section instead of XML-string escaping Default: A specialized layout that renders XML-formatted events. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. The name of the top XML node The value of the top XML node Name of the XML element Value inside the XML element Upgrade to private protected when using C# 7.2 Auto indent and create new lines Default: Gets the array of xml 'elements' configurations. Gets the array of 'attributes' configurations for the element Gets the collection of context properties that should be included with the other properties. Gets or sets whether empty XML-element should be included in the output. Default: . Empty value is either null or empty string Gets or sets the option to include all properties from the log event (as XML) Default: Gets or sets whether to include the contents of the dictionary. Default: Obsolete and replaced by with NLog v5. Gets or sets a value indicating whether to include contents of the dictionary. Default: Obsolete and replaced by with NLog v5. Gets or sets a value indicating whether to include contents of the dictionary. Default: Obsolete and replaced by with NLog v5. Gets or sets the option to include all properties from the log event (as XML) Default: List of property names to exclude when is XML element name to use when rendering properties Support string-format where {0} means property-key-name Skips closing element tag when having configured XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included Default: key . Newlines in attribute-value will be replaced with XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value. Default: . Newlines in attribute-value will be replaced with XML element name to use for rendering IList-collections items Default: item How far should the XML serializer follow object references before backing off Default: write attribute, only if is not empty rendered A specialized layout that renders XML-formatted events. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The name of the top XML node The value of the top XML node Name of the root XML element [Required] Default: logevent Value inside the root XML element Default: Determines whether or not this attribute will be Xml encoded. Default: Extensions for NLog . Renders the logevent into a result-value by using the provided layout Inside a , is preferred for performance reasons. The layout. The logevent info. Fallback value when no value available Result value when available, else fallback to defaultValue A fluent builder for logging events to NLog. Initializes a new instance of the class. The to send the log event. Initializes a new instance of the class. The to send the log event. The log level. LogEvent is only created when is enabled for The logger to write the log event to Logging event that will be written Sets a per-event context property on the logging event. The name of the context property. The value of the context property. Sets multiple per-event context properties on the logging event. The properties to set. Sets the information of the logging event. The exception information of the logging event. Sets the timestamp of the logging event. The timestamp of the logging event. Sets the log message on the logging event. A to be written. Sets the log message and parameters for formatting for the logging event. The type of the argument. A containing one format item. The argument to format. Sets the log message and parameters for formatting on the logging event. The type of the first argument. The type of the second argument. A containing format items. The first argument to format. The second argument to format. Sets the log message and parameters for formatting on the logging event. The type of the first argument. The type of the second argument. The type of the third argument. A containing format items. The first argument to format. The second argument to format. The third argument to format. Sets the log message and parameters for formatting on the logging event. A containing format items. Arguments to format. Sets the log message and parameters for formatting on the logging event. An object that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the log event to the underlying logger. The class of the caller to the method. This is captured by the NLog engine when necessary The method or property name of the caller to the method. This is set at by the compiler. The full path of the source file that contains the caller. This is set at by the compiler. The line number in the source file at which the method is called. This is set at by the compiler. Writes the log event to the underlying logger. The log level. Optional but when assigned to then it will discard the LogEvent. The method or property name of the caller to the method. This is set at by the compiler. The full path of the source file that contains the caller. This is set at by the compiler. The line number in the source file at which the method is called. This is set at by the compiler. Writes the log event to the underlying logger. Type of custom Logger wrapper. Represents the logging event. Gets the date of the first log event created. The formatted log message. The log message including any parameter placeholders Initializes a new instance of the class. Initializes a new instance of the class. Log level. Override default Logger name. Default is used when null Log message including parameter placeholders. Initializes a new instance of the class. Log level. Override default Logger name. Default is used when null Log message including parameter placeholders. Already parsed message template parameters. Initializes a new instance of the class. Log level. Override default Logger name. Default is used when null Pre-formatted log message for ${message}. Log message-template including parameter placeholders for ${message:raw=true}. Already parsed message template parameters. Initializes a new instance of the class. Log level. Override default Logger name. Default is used when null Log message. List of event-properties Initializes a new instance of the class. Log level. Override default Logger name. Default is used when null An IFormatProvider that supplies culture-specific formatting information. Log message including parameter placeholders. Parameter array. Initializes a new instance of the class. Log level. Override default Logger name. Default is used when null An IFormatProvider that supplies culture-specific formatting information. Log message including parameter placeholders. Parameter array. Exception information. Gets the sequence number for this LogEvent, which monotonously increasing for each LogEvent until int-overflow Marked obsolete with NLog 6.0, instead use ${counter:sequence=global} or ${guid:GeneratedFromLogEvent=true} Gets or sets the timestamp of the logging event. Gets or sets the level of the logging event. Gets a value indicating whether stack trace has been set for this event. Obsolete and replaced by or ${callsite} with NLog v5.3. Gets the stack frame of the method that did the logging. Gets the number index of the stack frame that represents the user code (not the NLog code). Gets the entire stack trace. Gets the callsite class name Gets the callsite member function name Gets the callsite source file path Gets the callsite source file line number Gets or sets the exception information. Gets or sets the logger name. Gets or sets the log message including any parameter placeholders. Gets or sets the parameter values or null if no parameters have been specified. Gets or sets the format provider that was provided while logging or when no formatProvider was specified. Gets or sets the message formatter for generating Uses string.Format(...) when nothing else has been configured. Gets the formatted message. Checks if any per-event properties (Without allocation) Gets the dictionary of per-event context properties. Gets the dictionary of per-event context properties. Provided when having parsed the message template and capture template parameters (else null) Gets the named parameters extracted from parsing as MessageTemplate Creates the null event. Null log event. Creates the log event. The log level. Override default Logger name. Default is used when null The message. Instance of . Creates the log event. The log level. Override default Logger name. Default is used when null The format provider. The message. The parameters. Instance of . Creates the log event. The log level. Override default Logger name. Default is used when null The format provider. The message. Instance of . Creates the log event. The log level. Override default Logger name. Default is used when null The exception. The format provider. The message. Instance of . Creates the log event. The log level. Override default Logger name. Default is used when null The exception. The format provider. The message. The parameters. Instance of . Creates from this by attaching the specified asynchronous continuation. The asynchronous continuation. Instance of with attached continuation. Returns a string representation of this log event. String representation of the log event. Sets the stack trace for the event info. The stack trace. Sets the stack trace for the event info. The stack trace. Index of the first user stack frame within the stack trace (Negative means NLog should skip stackframes from System-assemblies). Sets the details retrieved from the Caller Information Attributes Specialized LogFactory that can return instances of custom logger types. Use this only when a custom Logger type is defined. The type of the logger to be returned. Must inherit from . Gets the logger with type . The logger name. An instance of . Gets a custom logger with the full name of the current class (so namespace and class name) and type . An instance of . This is a slow-running method. Make sure you're not doing this in a loop. Creates and manages instances of objects. Internal for unit tests Overwrite possible file paths (including filename) for possible NLog config files. When this property is null, the default file paths ( are used. Occurs when logging changes. Both when assigned to new config or config unloaded. Note can be null when unloading configuration at shutdown. Event that is raised when the current Process / AppDomain terminates. Initializes a new instance of the class. Obsolete instead use default-constructor, and assign with NLog 5.0. Initializes a new instance of the class. The config. Initializes a new instance of the class. The config loader The custom AppEnvironmnet override Repository of interfaces used by NLog to allow override for dependency injection Gets or sets a value indicating whether exceptions should be thrown. See also . A value of if exception should be thrown; otherwise, . By default exceptions are not thrown under any circumstances. Gets or sets a value indicating whether should be thrown. If null then is used. A value of if exception should be thrown; otherwise, . This option is for backwards-compatibility. By default exceptions are not thrown under any circumstances. Gets or sets a value indicating whether Variables should be kept on configuration reload. Gets or sets a value indicating whether to automatically call on AppDomain.Unload or AppDomain.ProcessExit Gets or sets the current logging configuration. Setter will re-configure all -objects, so no need to also call Gets or sets the global log level threshold. Log events below this threshold are not logged. Gets or sets the default culture info to use as . Specific culture info or null to use Shutdown logging Begins configuration of the LogFactory options using fluent interface Begins configuration of the LogFactory options using fluent interface Creates a logger that discards all log messages. Null logger instance. Gets the logger with the full name of the current class, so namespace and class name. The logger. This method introduces performance hit, because of StackTrace capture. Make sure you are not calling this method in a loop. Gets the logger with the full name of the current class, so namespace and class name. Use to create instance of a custom . If you haven't defined your own class, then use the overload without the type parameter. The logger with type . Type of the logger This method introduces performance hit, because of StackTrace capture. Make sure you are not calling this method in a loop. Obsolete and replaced by with NLog v5.2. Gets a custom logger with the full name of the current class, so namespace and class name. Use to create instance of a custom . If you haven't defined your own class, then use the overload without the loggerType. The type of the logger to create. The type must inherit from The logger of type . This method introduces performance hit, because of StackTrace capture. Make sure you are not calling this method in a loop. Gets the specified named logger. Name of the logger. The logger reference. Multiple calls to GetLogger with the same argument are not guaranteed to return the same logger reference. Gets the specified named logger. Use to create instance of a custom . If you haven't defined your own class, then use the overload without the type parameter. Name of the logger. Type of the logger The logger reference with type . Multiple calls to GetLogger with the same argument are not guaranteed to return the same logger reference. Obsolete and replaced by with NLog v5.2. Gets the specified named logger. Use to create instance of a custom . If you haven't defined your own class, then use the overload without the loggerType. Name of the logger. The type of the logger to create. The type must inherit from . The logger of type . Multiple calls to GetLogger with the same argument aren't guaranteed to return the same logger reference. Loops through all loggers previously returned by GetLogger and recalculates their target and filter list. Useful after modifying the configuration programmatically to ensure that all loggers have been properly configured. Loops through all loggers previously returned by GetLogger and recalculates their target and filter list. Useful after modifying the configuration programmatically to ensure that all loggers have been properly configured. Purge garbage collected logger-items from the cache Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds. Flush any pending log messages (in case of asynchronous targets). Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages (in case of asynchronous targets). Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages Suspends the logging, and returns object for using-scope so scope-exit calls Logging is suspended when the number of calls are greater than the number of calls. An object that implements IDisposable whose Dispose() method re-enables logging. To be used with C# using () statement. Resumes logging if having called . Logging is suspended when the number of calls are greater than the number of calls. Returns if logging is currently enabled. Logging is suspended when the number of calls are greater than the number of calls. A value of if logging is currently enabled, otherwise. Raises the event when the configuration is reloaded. Event arguments. Currently this is disposing? Shutdown logging without flushing async to release both managed and unmanaged resources; to release only unmanaged resources. Dispose all targets, and shutdown logging. Obsolete and replaced by and with NLog v5.2. Get file paths (including filename) for the possible NLog config files. The file paths to the possible config file Obsolete and replaced by and with NLog v5.2. Get file paths (including filename) for the possible NLog config files. The file paths to the possible config file Obsolete and replaced by and with NLog v5.2. Overwrite the candidates paths (including filename) for the possible NLog config files. The file paths to the possible config file Obsolete and replaced by and with NLog v5.2. Clear the candidate file paths and return to the defaults. Obsolete and replaced by and with NLog v5.2. Loads logging configuration from file (Currently only XML configuration files supported) Configuration file to be read LogFactory instance for fluent interface Logger cache key. Logger cache. Inserts or updates. Loops through all cached loggers and removes dangling loggers that have been garbage collected. Internal for unit tests Enables logging in implementation. Initializes a new instance of the class. The factory. Enables logging. Logging methods which only are executed when the DEBUG conditional compilation symbol is set. Remarks: The DEBUG conditional compilation symbol is default enabled (only) in a debug build. If the DEBUG conditional compilation symbol isn't set in the calling library, the compiler will remove all the invocations to these methods. This could lead to better performance. See: https://msdn.microsoft.com/en-us/library/4xssyw96%28v=vs.90%29.aspx Provides logging interface and utility functions. Auto-generated Logger members for binary compatibility with NLog 1.0. Provides logging interface and utility functions. Writes the diagnostic message at the Debug level using the specified format provider and format parameters. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. The value to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameters and formatting them with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. Log message. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified parameter. Only executed when the DEBUG conditional compilation symbol is set. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified arguments formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified arguments formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. A to be written. Writes the diagnostic message at the Debug level. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified format provider and format parameters. Writes the diagnostic message at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. The value to be written. Writes the diagnostic message at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message and exception at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Trace level using the specified parameters and formatting them with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. Log message. Writes the diagnostic message at the Trace level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A containing format items. Arguments to format. Writes the diagnostic message at the Trace level using the specified parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified parameter. Only executed when the DEBUG conditional compilation symbol is set. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified arguments formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Trace level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Trace level using the specified arguments formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Trace level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. A to be written. Writes the diagnostic message at the Trace level. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Trace level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Trace level using the specified parameters. Only executed when the DEBUG conditional compilation symbol is set. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. Only executed when the DEBUG conditional compilation symbol is set. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. Only executed when the DEBUG conditional compilation symbol is set. A containing one format item. The argument to format. Gets a value indicating whether logging is enabled for the Trace level. A value of if logging is enabled for the Trace level, otherwise it returns . Gets a value indicating whether logging is enabled for the Debug level. A value of if logging is enabled for the Debug level, otherwise it returns . Gets a value indicating whether logging is enabled for the Info level. A value of if logging is enabled for the Info level, otherwise it returns . Gets a value indicating whether logging is enabled for the Warn level. A value of if logging is enabled for the Warn level, otherwise it returns . Gets a value indicating whether logging is enabled for the Error level. A value of if logging is enabled for the Error level, otherwise it returns . Gets a value indicating whether logging is enabled for the Fatal level. A value of if logging is enabled for the Fatal level, otherwise it returns . Writes the diagnostic message at the Trace level using the specified format provider and format parameters. Writes the diagnostic message at the Trace level. Type of the value. The value to be written. Writes the diagnostic message at the Trace level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Trace level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the Trace level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Trace level. Log message. Writes the diagnostic message at the Trace level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message and exception at the Trace level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Trace level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Trace level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Trace level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Trace level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Trace level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Trace level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Debug level using the specified format provider and format parameters. Writes the diagnostic message at the Debug level. Type of the value. The value to be written. Writes the diagnostic message at the Debug level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Debug level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the Debug level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Debug level. Log message. Writes the diagnostic message at the Debug level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message and exception at the Debug level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Debug level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Debug level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Debug level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Debug level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Debug level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Info level using the specified format provider and format parameters. Writes the diagnostic message at the Info level. Type of the value. The value to be written. Writes the diagnostic message at the Info level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Info level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the Info level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Info level. Log message. Writes the diagnostic message at the Info level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message and exception at the Info level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Info level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Info level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Info level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Info level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Info level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Info level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Warn level using the specified format provider and format parameters. Writes the diagnostic message at the Warn level. Type of the value. The value to be written. Writes the diagnostic message at the Warn level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Warn level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the Warn level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Warn level. Log message. Writes the diagnostic message at the Warn level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message and exception at the Warn level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Warn level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Warn level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Warn level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Warn level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Warn level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Warn level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Error level using the specified format provider and format parameters. Writes the diagnostic message at the Error level. Type of the value. The value to be written. Writes the diagnostic message at the Error level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Error level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the Error level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Error level. Log message. Writes the diagnostic message at the Error level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message and exception at the Error level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Error level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Error level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Error level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Error level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Error level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Error level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Fatal level using the specified format provider and format parameters. Writes the diagnostic message at the Fatal level. Type of the value. The value to be written. Writes the diagnostic message at the Fatal level. Type of the value. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the Fatal level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the Fatal level using the specified parameters and formatting them with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the Fatal level. Log message. Writes the diagnostic message at the Fatal level using the specified parameters. A containing format items. Arguments to format. Writes the diagnostic message and exception at the Fatal level. A to be written. An exception to be logged. Writes the diagnostic message and exception at the Fatal level. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message and exception at the Fatal level. An IFormatProvider that supplies culture-specific formatting information. A to be written. An exception to be logged. Arguments to format. Writes the diagnostic message at the Fatal level using the specified parameter and formatting it with the supplied format provider. The type of the argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified parameter. The type of the argument. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Fatal level using the specified parameters. The type of the first argument. The type of the second argument. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the Fatal level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the Fatal level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the specified level. The log level. A to be written. Writes the diagnostic message at the specified level. The log level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the specified level using the specified parameters. The log level. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the specified level using the specified parameters. The log level. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter and formatting it with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified value as a parameter. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level. A to be written. Writes the diagnostic message at the Trace level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Trace level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Trace level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level. A to be written. Writes the diagnostic message at the Debug level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Debug level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Debug level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level. A to be written. Writes the diagnostic message at the Info level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Info level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Info level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level. A to be written. Writes the diagnostic message at the Warn level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Warn level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Warn level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level. A to be written. Writes the diagnostic message at the Error level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Error level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Error level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level. A to be written. Writes the diagnostic message at the Fatal level. An IFormatProvider that supplies culture-specific formatting information. A to be written. Writes the diagnostic message at the Fatal level using the specified parameters. A containing format items. First argument to format. Second argument to format. Writes the diagnostic message at the Fatal level using the specified parameters. A containing format items. First argument to format. Second argument to format. Third argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter and formatting it with the supplied format provider. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified value as a parameter. A containing one format item. The argument to format. Initializes a new instance of the class. Occurs when logger configuration changes. Gets the name of the logger. Gets the factory that created this logger. Collection of context properties for the Logger. The logger will append it for all log events It is recommended to use for modifying context properties when same named logger is used at multiple locations or shared by different thread contexts. Gets a value indicating whether logging is enabled for the specified level. Log level to be checked. A value of if logging is enabled for the specified level, otherwise it returns . Creates new logger that automatically appends the specified property to all log events (without changing current logger) With property, all properties can be enumerated. Property Name Property Value New Logger object that automatically appends specified property Creates new logger that automatically appends the specified properties to all log events (without changing current logger) With property, all properties can be enumerated. Collection of key-value pair properties New Logger object that automatically appends specified properties Obsolete and replaced by that prevents unexpected side-effects in Logger-state. Updates the specified context property for the current logger. The logger will append it for all log events. With property, all properties can be enumerated (or updated). It is highly recommended to ONLY use for modifying context properties. This method will affect all locations/contexts that makes use of the same named logger object. And can cause unexpected surprises at multiple locations and other thread contexts. Property Name Property Value Updates the with provided property Name of property Value of property A disposable object that removes the properties from logical context scope on dispose. property-dictionary-keys are case-insensitive Updates the with provided property Name of property Value of property A disposable object that removes the properties from logical context scope on dispose. property-dictionary-keys are case-insensitive Updates the with provided properties Properties being added to the scope dictionary A disposable object that removes the properties from logical context scope on dispose. property-dictionary-keys are case-insensitive Updates the with provided properties Properties being added to the scope dictionary A disposable object that removes the properties from logical context scope on dispose. property-dictionary-keys are case-insensitive Pushes new state on the logical context scope stack Value to added to the scope stack A disposable object that pops the nested scope state on dispose. Pushes new state on the logical context scope stack Value to added to the scope stack A disposable object that pops the nested scope state on dispose. Writes the specified diagnostic message. Log event. Writes the specified diagnostic message. Type of custom Logger wrapper. Log event. Writes the diagnostic message at the specified level using the specified format provider and format parameters. Writes the diagnostic message at the specified level. Type of the value. The log level. The value to be written. Writes the diagnostic message at the specified level. Type of the value. The log level. An IFormatProvider that supplies culture-specific formatting information. The value to be written. Writes the diagnostic message at the specified level. The log level. A function returning message to be written. Function is not evaluated if logging is not enabled. Writes the diagnostic message at the specified level using the specified parameters and formatting them with the supplied format provider. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing format items. Arguments to format. Writes the diagnostic message at the specified level. The log level. Log message. Writes the diagnostic message at the specified level using the specified parameters. The log level. A containing format items. Arguments to format. Writes the diagnostic message and exception at the specified level. The log level. An exception to be logged. A to be written. Arguments to format. Writes the diagnostic message and exception at the specified level. The log level. An exception to be logged. An IFormatProvider that supplies culture-specific formatting information. A to be written. Arguments to format. Writes the diagnostic message at the specified level using the specified parameter and formatting it with the supplied format provider. The type of the argument. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified parameter. The type of the argument. The log level. A containing one format item. The argument to format. Writes the diagnostic message at the specified level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the specified level using the specified parameters. The type of the first argument. The type of the second argument. The log level. A containing one format item. The first argument to format. The second argument to format. Writes the diagnostic message at the specified level using the specified arguments formatting it with the supplied format provider. The type of the first argument. The type of the second argument. The type of the third argument. The log level. An IFormatProvider that supplies culture-specific formatting information. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Writes the diagnostic message at the specified level using the specified parameters. The type of the first argument. The type of the second argument. The type of the third argument. The log level. A containing one format item. The first argument to format. The second argument to format. The third argument to format. Runs the provided action. If the action throws, the exception is logged at Error level. The exception is not propagated outside of this method. Action to execute. Runs the provided function and returns its result. If an exception is thrown, it is logged at Error level. The exception is not propagated outside of this method; a default value is returned instead. Return type of the provided function. Function to run. Result returned by the provided function or the default value of type in case of exception. Runs the provided function and returns its result. If an exception is thrown, it is logged at Error level. The exception is not propagated outside of this method; a fallback value is returned instead. Return type of the provided function. Function to run. Fallback value to return in case of exception. Result returned by the provided function or fallback value in case of exception. Logs an exception is logged at Error level if the provided task does not run to completion. The task for which to log an error if it does not run to completion. This method is useful in fire-and-forget situations, where application logic does not depend on completion of task. This method is avoids C# warning CS4014 in such situations. Returns a task that completes when a specified task to completes. If the task does not run to completion, an exception is logged at Error level. The returned task always runs to completion. The task for which to log an error if it does not run to completion. A task that completes in the state when completes. Runs async action. If the action throws, the exception is logged at Error level. The exception is not propagated outside of this method. Async action to execute. Runs the provided async function and returns its result. If the task does not run to completion, an exception is logged at Error level. The exception is not propagated outside of this method; a default value is returned instead. Return type of the provided function. Async function to run. A task that represents the completion of the supplied task. If the supplied task ends in the state, the result of the new task will be the result of the supplied task; otherwise, the result of the new task will be the default value of type . Runs the provided async function and returns its result. If the task does not run to completion, an exception is logged at Error level. The exception is not propagated outside of this method; a fallback value is returned instead. Return type of the provided function. Async function to run. Fallback value to return if the task does not end in the state. A task that represents the completion of the supplied task. If the supplied task ends in the state, the result of the new task will be the result of the supplied task; otherwise, the result of the new task will be the fallback value. Raises the event when the logger is reconfigured. Event arguments Implementation of logging engine. Gets the filter result. The filter chain. The log event. default result if there are no filters, or none of the filters decides. The result of the filter. Defines available log levels. Log levels ordered by severity:
- (Ordinal = 0) : Most verbose level. Used for development and seldom enabled in production.
- (Ordinal = 1) : Debugging the application behavior from internal events of interest.
- (Ordinal = 2) : Information that highlights progress or application lifetime events.
- (Ordinal = 3) : Warnings about validation issues or temporary failures that can be recovered.
- (Ordinal = 4) : Errors where functionality has failed or have been caught.
- (Ordinal = 5) : Most critical level. Application is about to abort.
Trace log level (Ordinal = 0) Most verbose level. Used for development and seldom enabled in production. Debug log level (Ordinal = 1) Debugging the application behavior from internal events of interest. Info log level (Ordinal = 2) Information that highlights progress or application lifetime events. Warn log level (Ordinal = 3) Warnings about validation issues or temporary failures that can be recovered. Error log level (Ordinal = 4) Errors where functionality has failed or have been caught. Fatal log level (Ordinal = 5) Most critical level. Application is about to abort. Off log level (Ordinal = 6) Gets all the available log levels (Trace, Debug, Info, Warn, Error, Fatal, Off). Gets all the log levels that can be used to log events (Trace, Debug, Info, Warn, Error, Fatal) i.e LogLevel.Off is excluded. Initializes a new instance of . The log level name. The log level ordinal number. Gets the name of the log level. Gets the ordinal of the log level. Compares two objects and returns a value indicating whether the first one is equal to the second one. The first level. The second level. The value of level1.Ordinal == level2.Ordinal. Compares two objects and returns a value indicating whether the first one is not equal to the second one. The first level. The second level. The value of level1.Ordinal != level2.Ordinal. Compares two objects and returns a value indicating whether the first one is greater than the second one. The first level. The second level. The value of level1.Ordinal > level2.Ordinal. Compares two objects and returns a value indicating whether the first one is greater than or equal to the second one. The first level. The second level. The value of level1.Ordinal >= level2.Ordinal. Compares two objects and returns a value indicating whether the first one is less than the second one. The first level. The second level. The value of level1.Ordinal < level2.Ordinal. Compares two objects and returns a value indicating whether the first one is less than or equal to the second one. The first level. The second level. The value of level1.Ordinal <= level2.Ordinal. Gets the that corresponds to the specified ordinal. The ordinal. The instance. For 0 it returns , 1 gives and so on. Returns the that corresponds to the supplied . The textual representation of the log level. The enumeration value. Returns a string representation of the log level. Log level name. Determines whether the specified instance is equal to this instance. The to compare with this instance. Value of if the specified is equal to this instance; otherwise, . Compares the level to the other object. The other object. A value less than zero when this logger's is less than the other logger's ordinal, 0 when they are equal and greater than zero when this ordinal is greater than the other ordinal. Compares the level to the other object. The other object. A value less than zero when this logger's is less than the other logger's ordinal, 0 when they are equal and greater than zero when this ordinal is greater than the other ordinal. Support implementation of Creates and manages instances of objects. LogManager wraps a singleton instance of . Gets the instance used in the . Occurs when logging changes. Both when assigned to new config or config unloaded. Note can be null when unloading configuration at shutdown. Gets or sets a value indicating whether NLog should throw exceptions. By default exceptions are not thrown under any circumstances. Gets or sets a value indicating whether should be thrown. A value of if exception should be thrown; otherwise, . This option is for backwards-compatibility. By default exceptions are not thrown under any circumstances. Gets or sets a value indicating whether Variables should be kept on configuration reload. Gets or sets a value indicating whether to automatically call on AppDomain.Unload or AppDomain.ProcessExit Gets or sets the current logging configuration. Setter will re-configure all -objects, so no need to also call Gets or sets the global log threshold. Log events below this threshold are not logged. Begins configuration of the LogFactory options using fluent interface Begins configuration of the LogFactory options using fluent interface Obsolete and replaced by and with NLog v5.2. Loads logging configuration from file (Only XML configuration files supported) Configuration file to be read LogFactory instance for fluent interface Adds the given assembly which will be skipped when NLog is trying to find the calling method on stack trace. The assembly to skip. Gets the logger with the full name of the current class, so namespace and class name. The logger. This method introduces performance hit, because of StackTrace capture. Make sure you are not calling this method in a loop. Obsolete and replaced by with NLog v5.2. Gets a custom logger with the full name of the current class, so namespace and class name. Use to create instance of a custom . If you haven't defined your own class, then use the overload without the loggerType. The type of the logger to create. The type must inherit from The logger of type . This method introduces performance hit, because of StackTrace capture. Make sure you are not calling this method in a loop. Creates a logger that discards all log messages. Null logger which discards all log messages. Gets the specified named logger. Name of the logger. The logger reference. Multiple calls to GetLogger with the same argument aren't guaranteed to return the same logger reference. Obsolete and replaced by with NLog v5.2. Gets the specified named custom using the parameter for creating instance. If you haven't defined your own class, then use the overload without the loggerType. Name of the logger. The logger class. This class must inherit from . The logger of type . Multiple calls to GetLogger with the same argument aren't guaranteed to return the same logger reference. The generic way for this method is Loops through all loggers previously returned by GetLogger. and recalculates their target and filter list. Useful after modifying the configuration programmatically to ensure that all loggers have been properly configured. Loops through all loggers previously returned by GetLogger. and recalculates their target and filter list. Useful after modifying the configuration programmatically to ensure that all loggers have been properly configured. Purge garbage collected logger-items from the cache Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds. Flush any pending log messages (in case of asynchronous targets). Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages (in case of asynchronous targets). Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Maximum time to allow for the flush. Any messages after that time will be discarded. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Maximum time to allow for the flush. Any messages after that time will be discarded. Obsolete and replaced by by with NLog v5. Suspends the logging, and returns object for using-scope so scope-exit calls Logging is suspended when the number of calls are greater than the number of calls. An object that implements IDisposable whose Dispose() method re-enables logging. To be used with C# using () statement. Obsolete and replaced by disposing the scope returned from with NLog v5. Resumes logging if having called . Logging is suspended when the number of calls are greater than the number of calls. Suspends the logging, and returns object for using-scope so scope-exit calls Logging is suspended when the number of calls are greater than the number of calls. An object that implements IDisposable whose Dispose() method re-enables logging. To be used with C# using () statement. Resumes logging if having called . Logging is suspended when the number of calls are greater than the number of calls. Returns if logging is currently enabled. Logging is suspended when the number of calls are greater than the number of calls. A value of if logging is currently enabled, otherwise. Dispose all targets, and shutdown logging. Generates a formatted message from the log event Log event. Formatted message Returns a log message. Used to defer calculation of the log message until it's actually needed. Log message. Obsolete and replaced by 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. Sets the current thread MDC item to the specified value. Item name. Item value. An that can be used to remove the item from the current thread MDC. Sets the current thread MDC item to the specified value. Item name. Item value. >An that can be used to remove the item from the current thread MDC. Sets the current thread MDC item to the specified value. Item name. Item value. Sets the current thread MDC item to the specified value. Item name. Item value. Gets the current thread MDC named item, as . Item name. The value of , if defined; otherwise . If the value isn't a already, this call locks the for reading the needed for converting to . Gets the current thread MDC named item, as . Item name. The to use when converting a value to a . The value of , if defined; otherwise . If is null and the value isn't a already, this call locks the for reading the needed for converting to . Gets the current thread MDC named item, as . Item name. The value of , if defined; otherwise null. Returns all item names A set of the names of all items in current thread-MDC. Checks whether the specified item exists in current thread MDC. Item name. A boolean indicating whether the specified exists in current thread MDC. Removes the specified from current thread MDC. Item name. Clears the content of current thread MDC. Obsolete and replaced by 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. Ideally, these changes should be incorporated as a new version of the MappedDiagnosticsContext class in the original NLog library so that state can be maintained for multiple threads in asynchronous situations. Gets the current logical context named item, as . Item name. The value of , if defined; otherwise . If the value isn't a already, this call locks the for reading the needed for converting to . Gets the current logical context named item, as . Item name. The to use when converting a value to a string. The value of , if defined; otherwise . If is null and the value isn't a already, this call locks the for reading the needed for converting to . Gets the current logical context named item, as . Item name. The value of , if defined; otherwise null. Sets the current logical context item to the specified value. Item name. Item value. >An that can be used to remove the item from the current logical context. Sets the current logical context item to the specified value. Item name. Item value. >An that can be used to remove the item from the current logical context. Sets the current logical context item to the specified value. Item name. Item value. >An that can be used to remove the item from the current logical context. Updates the current logical context with multiple items in single operation . >An that can be used to remove the item from the current logical context (null if no items). Sets the current logical context item to the specified value. Item name. Item value. Sets the current logical context item to the specified value. Item name. Item value. Sets the current logical context item to the specified value. Item name. Item value. Returns all item names A collection of the names of all items in current logical context. Checks whether the specified exists in current logical context. Item name. A boolean indicating whether the specified exists in current logical context. Removes the specified from current logical context. Item name. Clears the content of current logical context. Clears the content of current logical context. Free the full slot. Mark a parameter of a method for message templating Specifies which parameter of an annotated method should be treated as message-template-string The name of the parameter that should be as treated as message-template-string The type of the captured hole Not decided normal {x} Serialize operator {@x} (aka destructure) stringification operator {$x} A hole that will be replaced with a value Constructor Parameter name sent to structured loggers. This is everything between "{" and the first of ",:}". Including surrounding spaces and names that are numbers. Format to render the parameter. This is everything between ":" and the first unescaped "}" Type When the template is positional, this is the parsed name of this parameter. For named templates, the value of Index is undefined. Alignment to render the parameter, by default 0. This is the parsed value between "," and the first of ":}" A fixed value Number of characters from the original template to copy at the current position. This can be 0 when the template starts with a hole or when there are multiple consecutive holes. Number of characters to skip in the original template at the current position. 0 is a special value that mean: 1 escaped char, no hole. It can also happen last when the template ends with a literal. Combines Literal and Hole Literal Hole Uninitialized when = 0. Description of a single parameter extracted from a MessageTemplate Parameter Name extracted from This is everything between "{" and the first of ",:}". Parameter Value extracted from the -array Format to render the parameter. This is everything between ":" and the first unescaped "}" Parameter method that should be used to render the parameter See also Returns index for , when Constructs a single message template parameter Parameter Name Parameter Value Parameter Format Constructs a single message template parameter Parameter Name Parameter Value Parameter Format Parameter CaptureType Parameters extracted from parsing as MessageTemplate Gets the parameters at the given index Number of parameters Indicates whether the template should be interpreted as positional (all holes are numbers) or named. Indicates whether the template was parsed successful, and there are no unmatched parameters Constructor for parsing the message template with parameters including any parameter placeholders All Constructor for named parameters that already has been parsed Create MessageTemplateParameter from Parse templates. Parse a template. Template to be parsed. When is null. Template, never null Gets the current literal/hole in the template Clears the enumerator Restarts the enumerator of the template Moves to the next literal/hole in the template Found new element [true/false] Parse format after hole name/index. Handle the escaped { and } in the format. Don't read the last } Error when parsing a template. Current index when the error occurred. The template we were parsing New exception The message to be shown. Current index when the error occurred. Convert, Render or serialize a value, with optionally backwards-compatible with Serialization of an object, e.g. JSON and append to The object to serialize to string. Parameter Format Parameter CaptureType An object that supplies culture-specific formatting information. Output destination. Serialize succeeded (true/false) Format an object to a readable string, or if it's an object, serialize The value to convert Try serializing a scalar (string, int, NULL) or simple type (IFormattable) Serialize Dictionary as JSON like structure, without { and } "FirstOrder"=true, "Previous login"=20-12-2017 14:55:32, "number of tries"=1 format string of an item Convert a value to a string with format and append to . The value to convert. Format sting for the value. Format provider for the value. Append to this Obsolete and replaced by 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. Gets the top NDC message but doesn't remove it. The top message. . Gets the top NDC object but doesn't remove it. The object at the top of the NDC stack if defined; otherwise null. Pushes the specified text on current thread NDC. The text to be pushed. An instance of the object that implements IDisposable that returns the stack to the previous level when IDisposable.Dispose() is called. To be used with C# using() statement. Pushes the specified object on current thread NDC. The object to be pushed. An instance of the object that implements IDisposable that returns the stack to the previous level when IDisposable.Dispose() is called. To be used with C# using() statement. Pops the top message off the NDC stack. The top message which is no longer on the stack. Pops the top message from the NDC stack. The to use when converting the value to a string. The top message, which is removed from the stack, as a string value. Pops the top object off the NDC stack. The object from the top of the NDC stack, if defined; otherwise null. Peeks the first object on the NDC stack The object from the top of the NDC stack, if defined; otherwise null. Clears current thread NDC stack. Gets all messages on the stack. Array of strings on the stack. Gets all messages from the stack, without removing them. The to use when converting a value to a string. Array of strings. Gets all objects on the stack. Array of objects on the stack. Obsolete and replaced by 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. Pushes the specified value on current stack The value to be pushed. An instance of the object that implements IDisposable that returns the stack to the previous level when IDisposable.Dispose() is called. To be used with C# using() statement. Pushes the specified value on current stack The value to be pushed. An instance of the object that implements IDisposable that returns the stack to the previous level when IDisposable.Dispose() is called. To be used with C# using() statement. Pops the top message off the NDLC stack. The top message which is no longer on the stack. this methods returns a object instead of string, this because of backwards-compatibility Pops the top message from the NDLC stack. The to use when converting the value to a string. The top message, which is removed from the stack, as a string value. Pops the top message off the current NDLC stack The object from the top of the NDLC stack, if defined; otherwise null. Peeks the top object on the current NDLC stack The object from the top of the NDLC stack, if defined; otherwise null. Clears current stack. Gets all messages on the stack. Array of strings on the stack. Gets all messages from the stack, without removing them. The to use when converting a value to a string. Array of strings. Gets all objects on the stack. The objects are not removed from the stack. Array of objects on the stack. Exception thrown during NLog configuration. Initializes a new instance of the class. Initializes a new instance of the class. The message. Obsolete and replaced by using normal string-interpolation with in NLog v5. Initializes a new instance of the class. The message. Parameters for the message Obsolete and replaced by using normal string-interpolation with in NLog v5. Initializes a new instance of the class. The inner exception. The message. Parameters for the message Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). Exception thrown during log event processing. Initializes a new instance of the class. Initializes a new instance of the class. The message. Obsolete and replaced by using normal string-interpolation with in NLog v5. Initializes a new instance of the class. The message. Parameters for the message Initializes a new instance of the class. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). It works as a normal but it discards all messages which an application requests to be logged. It effectively implements the "Null Object" pattern for objects. Initializes a new instance of . The factory class to be used for the creation of this logger. 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) (MDLC), (MDC), (NDLC) and (NDC) have been deprecated and replaced by . .NetCore (and .Net46) uses AsyncLocal for handling the thread execution context. Older .NetFramework uses System.Runtime.Remoting.CallContext Pushes new state on the logical context scope stack together with provided properties Value to added to the scope stack Properties being added to the scope dictionary A disposable object that pops the nested scope state on dispose (including properties). Scope dictionary keys are case-insensitive Updates the logical scope context with provided properties Properties being added to the scope dictionary A disposable object that removes the properties from logical context scope on dispose. Scope dictionary keys are case-insensitive Updates the logical scope context with provided properties Properties being added to the scope dictionary A disposable object that removes the properties from logical context scope on dispose. Scope dictionary keys are case-insensitive Updates the logical scope context with provided property Name of property Value of property A disposable object that removes the properties from logical context scope on dispose. Scope dictionary keys are case-insensitive Updates the logical scope context with provided property Name of property Value of property A disposable object that removes the properties from logical context scope on dispose. Scope dictionary keys are case-insensitive Pushes new state on the logical context scope stack Value to added to the scope stack A disposable object that pops the nested scope state on dispose. Skips casting of to check for scope-properties Pushes new state on the logical context scope stack Value to added to the scope stack A disposable object that pops the nested scope state on dispose. Clears all the entire logical context scope, and removes any properties and nested-states Retrieves all properties stored within the logical context scopes Collection of all properties Lookup single property stored within the logical context scopes Name of property When this method returns, contains the value associated with the specified key Returns when value is found with the specified key Scope dictionary keys are case-insensitive Retrieves all nested states inside the logical context scope stack Array of nested state objects. Peeks the top value from the logical context scope stack Value from the top of the stack. Peeks the inner state (newest) from the logical context scope stack, and returns its running duration Scope Duration Time Peeks the outer state (oldest) from the logical context scope stack, and returns its running duration Scope Duration Time Special bookmark that can restore original parent, after scopes has been collapsed Extension methods to setup LogFactory options Gets the logger with the full name of the current class, so namespace and class name. Gets the specified named logger. Configures general options for NLog LogFactory before loading NLog config Configures loading of NLog extensions for Targets and LayoutRenderers Configures the output of NLog for diagnostics / troubleshooting Configures serialization and transformation of LogEvents Loads NLog config created by the method Loads NLog config provided in Loads NLog config from filename if provided, else fallback to scanning for NLog.config Fluent interface parameter. Explicit configuration file to be read (Default NLog.config from candidates paths) Whether to allow application to run when NLog config is not available Loads NLog config from file-paths if provided, else fallback to scanning for NLog.config Fluent interface parameter. Candidates file paths (including filename) where to scan for NLog config files Whether to allow application to run when NLog config is not available Loads NLog config from XML in Loads NLog config located in embedded resource from main application assembly. Fluent interface parameter. Assembly for the main Application project with embedded resource Name of the manifest resource for NLog config XML Reloads the current logging configuration and activates it Logevents produced during the configuration-reload can become lost, as targets are unavailable while closing and initializing. Extension methods to setup NLog extensions, so they are known when loading NLog LoggingConfiguration Enable/disables autoloading of NLog extensions by scanning and loading available assemblies Disabled by default as it can give a huge performance hit during startup. Recommended to keep it disabled especially when running in the cloud. Enable/disables autoloading of NLog extensions by scanning and loading available assemblies Disabled by default as it can give a huge performance hit during startup. Recommended to keep it disabled especially when running in the cloud. Registers NLog extensions from the assembly. Registers NLog extensions from the assembly type name Register a custom NLog Configuration Type. Type of the NLog configuration item Fluent interface parameter. Register a custom NLog Target. Type of the Target. Fluent interface parameter. The target type-alias for use in NLog configuration. Will extract from class-attribute when unassigned. Register a custom NLog Target. Type of the Target. Fluent interface parameter. The factory method for creating instance of NLog Target The target type-alias for use in NLog configuration. Will extract from class-attribute when unassigned. Register a custom NLog Target. Fluent interface parameter. Type name of the Target The target type-alias for use in NLog configuration Register a custom NLog Layout. Type of the layout renderer. Fluent interface parameter. The layout type-alias for use in NLog configuration. Will extract from class-attribute when unassigned. Register a custom NLog Layout. Type of the layout renderer. Fluent interface parameter. The factory method for creating instance of NLog Layout The layout type-alias for use in NLog configuration. Will extract from class-attribute when unassigned. Register a custom NLog Layout. Fluent interface parameter. Type of the layout. The layout type-alias for use in NLog configuration Register a custom NLog LayoutRenderer. Type of the layout renderer. Fluent interface parameter. The layout-renderer type-alias for use in NLog configuration - without '${ }'. Will extract from class-attribute when unassigned. Register a custom NLog LayoutRenderer. Type of the layout renderer. Fluent interface parameter. The factory method for creating instance of NLog LayoutRenderer The layout-renderer type-alias for use in NLog configuration - without '${ }'. Will extract from class-attribute when unassigned. Register a custom NLog LayoutRenderer. Fluent interface parameter. Type of the layout renderer. The layout-renderer type-alias for use in NLog configuration - without '${ }' Register a custom NLog LayoutRenderer with a callback function . The callback receives the logEvent. Fluent interface parameter. The layout-renderer type-alias for use in NLog configuration - without '${ }' Callback that returns the value for the layout renderer. Register a custom NLog LayoutRenderer with a callback function . The callback receives the logEvent and the current configuration. Fluent interface parameter. The layout-renderer type-alias for use in NLog configuration - without '${ }' Callback that returns the value for the layout renderer. Register a custom NLog LayoutRenderer with a callback function . The callback receives the logEvent. Fluent interface parameter. The layout-renderer type-alias for use in NLog configuration - without '${ }' Callback that returns the value for the layout renderer. Whether method is ThreadAgnostic and doesn't depend on context of the logging application thread. Register a custom NLog LayoutRenderer with a callback function . The callback receives the logEvent and the current configuration. Fluent interface parameter. The layout-renderer type-alias for use in NLog configuration - without '${ }' Callback that returns the value for the layout renderer. Whether method is ThreadAgnostic and doesn't depend on context of the logging application thread. Register a custom NLog LayoutRenderer with a callback function Fluent interface parameter. LayoutRenderer instance with type-alias and callback-method. Register a custom condition method, that can use in condition filters Fluent interface parameter. Name of the condition filter method MethodInfo extracted by reflection - typeof(MyClass).GetMethod("MyFunc", BindingFlags.Static). Register a custom condition method, that can use in condition filters Fluent interface parameter. Name of the condition filter method Lambda method. Register a custom condition method, that can use in condition filters Fluent interface parameter. Name of the condition filter method Lambda method. Register (or replaces) singleton-object for the specified service-type Service interface type Fluent interface parameter. Implementation of interface. Register (or replaces) singleton-object for the specified service-type Fluent interface parameter. Service interface type. Implementation of interface. Register (or replaces) external service-repository for resolving dependency injection Fluent interface parameter. External dependency injection repository Extension methods to setup NLog options Configures Configures Configures Configures Configures Configures Resets the InternalLogger configuration without resolving default values from Environment-variables or App.config Configure the InternalLogger properties from Environment-variables and App.config using Recognizes the following environment-variables: - NLOG_INTERNAL_LOG_LEVEL - NLOG_INTERNAL_LOG_FILE - NLOG_INTERNAL_LOG_TO_CONSOLE - NLOG_INTERNAL_LOG_TO_CONSOLE_ERROR - NLOG_INTERNAL_INCLUDE_TIMESTAMP Legacy .NetFramework platform will also recognizes the following app.config settings: - nlog.internalLogLevel - nlog.internalLogFile - nlog.internalLogToConsole - nlog.internalLogToConsoleError - nlog.internalLogIncludeTimestamp Extension methods to setup NLog Configures the global time-source used for all logevents Available by default: , , , Updates the dictionary ${gdc:item=} with the name-value-pair Defines for redirecting output from matching to wanted targets. Fluent interface parameter. Logger name pattern to check which names matches this rule Rule identifier to allow rule lookup Defines for redirecting output from matching to wanted targets. Fluent interface parameter. Restrict minimum LogLevel for names that matches this rule Logger name pattern to check which names matches this rule Rule identifier to allow rule lookup Defines for redirecting output from matching to wanted targets. Fluent interface parameter. Override the name for the target created Apply fast filtering based on . Include LogEvents with same or worse severity as . Fluent interface parameter. Minimum level that this rule matches Apply fast filtering based on . Include LogEvents with same or less severity as . Fluent interface parameter. Maximum level that this rule matches Apply fast filtering based on . Include LogEvents with severity that equals . Fluent interface parameter. Single loglevel that this rule matches Apply fast filtering based on . Include LogEvents with severity between and . Fluent interface parameter. Minimum level that this rule matches Maximum level that this rule matches Apply dynamic filtering logic for advanced control of when to redirect output to target. Slower than using Logger-name or LogLevel-severity, because of allocation. Fluent interface parameter. Filter for controlling whether to write Default action if none of the filters match Apply dynamic filtering logic for advanced control of when to redirect output to target. Slower than using Logger-name or LogLevel-severity, because of allocation. Fluent interface parameter. Delegate for controlling whether to write Default action if none of the filters match Dynamic filtering of LogEvent, where it will be ignored when matching filter-method-delegate Slower than using Logger-name or LogLevel-severity, because of allocation. Fluent interface parameter. Delegate for controlling whether to write LogEvent will on match also be ignored by following logging-rules Dynamic filtering of LogEvent, where it will be logged when matching filter-method-delegate Slower than using Logger-name or LogLevel-severity, because of allocation. Fluent interface parameter. Delegate for controlling whether to write LogEvent will not be evaluated by following logging-rules Move the to the top, to match before any of the existing Redirect output from matching to the provided Fluent interface parameter. Target that should be written to. Fluent interface for configuring targets for the new LoggingRule. Redirect output from matching to the provided Fluent interface parameter. Target-collection that should be written to. Fluent interface for configuring targets for the new LoggingRule. Redirect output from matching to the provided Fluent interface parameter. Target-collection that should be written to. Fluent interface for configuring targets for the new LoggingRule. Discard output from matching , so it will not reach any following . Fluent interface parameter. Only discard output from matching Logger when below minimum LogLevel Returns first target registered Returns first target registered with the specified type Type of target Write to Fluent interface parameter. Method to call on logevent Layouts to render object[]-args before calling Write to Fluent interface parameter. Override the default Layout for output Override the default Encoding for output (Ex. UTF8) Write to stderr instead of standard output (stdout) Skip overhead from writing to console, when not available (Ex. running as Windows Service) Force Console.WriteLine (slower) instead of Console.WriteBuffer (faster) Write to and color log-messages based on Fluent interface parameter. Override the default Layout for output Highlight only the Level-part Override the default Encoding for output (Ex. UTF8) Write to stderr instead of standard output (stdout) Skip overhead from writing to console, when not available (Ex. running as Windows Service) Enables output using ANSI Color Codes (Windows console does not support this by default) Write to Override the default Layout for output Write to (when DEBUG-build) Override the default Layout for output Write to Fluent interface parameter. Override the default Layout for output Override the default Encoding for output (Default = UTF8) Override the default line ending characters (Ex. without CR) Keep log file open instead of opening and closing it on each logging event Size in bytes where log files will be automatically archived. Maximum number of archive files that should be kept. Maximum days of archive files that should be kept. Applies target wrapper for existing Fluent interface parameter. Factory method for creating target-wrapper Applies for existing for asynchronous background writing Fluent interface parameter. Action to take when queue overflows Queue size limit for pending logevents Batch size when writing on the background thread Applies for existing for throttled writing Fluent interface parameter. Buffer size limit for pending logevents Timeout for when the buffer will flush automatically using background thread Restart timeout when logevent is written Action to take when buffer overflows Applies for existing for flushing after conditional event Fluent interface parameter. Method delegate that controls whether logevent should force flush. Only flush when triggers (Ignore config-reload and config-shutdown) Applies for existing for retrying after failure Fluent interface parameter. Number of retries that should be attempted on the wrapped target in case of a failure. Time to wait between retries Applies for existing to fallback on failure. Fluent interface parameter. Target to use for fallback Whether to return to the first target after any successful write Extension methods to setup general option before loading NLog LoggingConfiguration Configures the global time-source used for all logevents Available by default: , , , Configures the global time-source used for all logevents to use Configures the global time-source used for all logevents to use Updates the dictionary ${gdc:item=} with the name-value-pair Sets whether to automatically call on AppDomain.Unload or AppDomain.ProcessExit Sets the default culture info to use as . Sets the global log level threshold. Log events below this threshold are not logged. Gets or sets a value indicating whether should be thrown on configuration errors Mark Assembly as hidden, so Assembly methods are excluded when resolving ${callsite} from StackTrace Mark Type as hidden, so Type methods are excluded when resolving ${callsite} from StackTrace Extension methods to setup NLog extensions, so they are known when loading NLog LoggingConfiguration Enable/disables the NLog Message Template Parsing: - = Always use NLog mesage-template-parser and formatting. - = Never use NLog-parser and only use string.Format (Disable support for message-template-syntax). - = Auto detection of message-template-syntax, with fallback to string.Format (Default Behavior). Overrides the active with a new custom implementation Overrides the active with a new custom implementation Overrides the active to use legacy-mode string-quotes (Before NLog v6) Registers object Type transformation so build trimming will keep public properties. Registers object Type transformation from dangerous (massive) object to safe (reduced) object Registers object Type transformation from dangerous (massive) object to safe (reduced) object Abstract Target with async Task support See NLog Wiki [Target("MyFirst")] public sealed class MyFirstTarget : AsyncTaskTarget { public MyFirstTarget() { this.Host = "localhost"; } public Layout Host { get; set; } protected override Task WriteAsyncTask(LogEventInfo logEvent, CancellationToken token) { string logMessage = this.RenderLogEvent(this.Layout, logEvent); string hostName = this.RenderLogEvent(this.Host, logEvent); return SendTheMessageToRemoteHost(hostName, logMessage); } private async Task SendTheMessageToRemoteHost(string hostName, string message) { // To be implemented } } Documentation on NLog Wiki How many milliseconds to delay the actual write operation to optimize for batching Default: How many seconds a Task is allowed to run before it is cancelled. Default: How many attempts to retry the same Task, before it is aborted Default: How many milliseconds to wait before next retry (will double with each retry) Default: ms Gets or sets whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation Default: Gets or sets the action to be taken when the lazy writer thread request queue count exceeds the set limit. Default: Gets or sets the limit on the number of requests in the lazy writer thread request queue. Default: Gets or sets the number of log events that should be processed in a batch by the lazy writer thread. Default: Task Scheduler used for processing async Tasks Default: Constructor Override this to provide async task for writing a single logevent. Example of how to override this method, and call custom async method protected override Task WriteAsyncTask(LogEventInfo logEvent, CancellationToken token) { return CustomWriteAsync(logEvent, token); } private async Task CustomWriteAsync(LogEventInfo logEvent, CancellationToken token) { await MyLogMethodAsync(logEvent, token).ConfigureAwait(false); } The log event. The cancellation token Override this to provide async task for writing a batch of logevents. A batch of logevents. The cancellation token Handle cleanup after failed write operation Exception from previous failed Task The cancellation token Number of retries remaining Time to sleep before retrying Should attempt retry Block for override. Instead override Block for override. Instead override Write to queue without locking Block for override. Instead override LogEvent is written to target, but target failed to successfully initialize Enqueue logevent for later processing when target failed to initialize because of unresolved service dependency. Schedules notification of when all messages has been written Closes Target by updating CancellationToken Releases any managed resources Checks the internal queue for the next to create a new task for Used for race-condition validation between task-completion and timeout Signals whether previousTask completed an almost full BatchSize Generates recursive task-chain to perform retry of writing logevents with increasing retry-delay Creates new task to handle the writing of the input LogEvents to write New Task created [true / false] Handles that scheduled task has completed (successfully or failed), and starts the next pending task Task just completed AsyncContinuation to notify of success or failure Timer method, that is fired when pending task fails to complete within timeout Color formatting for using ANSI Color Codes Not using bold to get light colors, as it has to be cleared Not using bold to get light colors, as it has to be cleared (And because it only works for text, and not background) Resets both foreground and background color. ANSI have 8 color-codes (30-37) by default. The "bright" (or "intense") color-codes (90-97) are extended values not supported by all terminals Color formatting for using and Writes log messages to the console with customizable coloring. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Should logging being paused/stopped because of the race condition bug in Console.Writeline? Console.Out.Writeline / Console.Error.Writeline could throw 'IndexOutOfRangeException', which is a bug. See https://stackoverflow.com/questions/33915790/console-out-and-console-error-race-condition-error-in-a-windows-service-written and https://connect.microsoft.com/VisualStudio/feedback/details/2057284/console-out-probable-i-o-race-condition-issue-in-multi-threaded-windows-service Full error: Error during session close: System.IndexOutOfRangeException: Probable I/ O race condition detected while copying memory. The I/ O package is not thread safe by default. In multi-threaded applications, a stream must be accessed in a thread-safe way, such as a thread - safe wrapper returned by TextReader's or TextWriter's Synchronized methods.This also applies to classes like StreamWriter and StreamReader. Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Initializes a new instance of the class for Unit-Testing. Obsolete and replaced by with NLog v5. Gets or sets a value indicating whether the error stream (stderr) should be used instead of the output stream (stdout). Gets or sets a value indicating whether to send the log messages to the standard error instead of the standard output. Gets or sets a value indicating whether to use default row highlighting rules. Default: which enables the following rules:
Condition Foreground Color Background Color
level == LogLevel.Fatal Red NoChange
level == LogLevel.Error Red NoChange
level == LogLevel.Warn Yellow NoChange
level == LogLevel.Info White NoChange
level == LogLevel.Debug Gray NoChange
level == LogLevel.Trace Gray NoChange
The encoding for writing messages to the . Has side effect Gets or sets a value indicating whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) Default: Gets or sets a value indicating whether to auto-check if the console has been redirected to file - Disables coloring logic when System.Console.IsOutputRedirected = Default: Gets or sets a value indicating whether to auto-flush after Default: . Normally not required as standard Console.Out will have = true, but not when pipe to file Enables output using ANSI Color Codes Default: Support NO_COLOR=1 environment variable. See also Default: NO_COLOR=1 Gets the row highlighting rules. Gets the word highlighting rules. Colored console output color. Note that this enumeration is defined to be binary compatible with .NET 2.0 System.ConsoleColor + some additions Black Color (#000000). Dark blue Color (#000080). Dark green Color (#008000). Dark Cyan Color (#008080). Dark Red Color (#800000). Dark Magenta Color (#800080). Dark Yellow Color (#808000). Gray Color (#C0C0C0). Dark Gray Color (#808080). Blue Color (#0000FF). Green Color (#00FF00). Cyan Color (#00FFFF). Red Color (#FF0000). Magenta Color (#FF00FF). Yellow Color (#FFFF00). White Color (#FFFFFF). Don't change the color. The row-highlighting condition. Initializes a new instance of the class. Initializes a new instance of the class. The condition. Color of the foreground. Color of the background. Gets the default highlighting rule. Doesn't change the color. Gets or sets the condition that must be met in order to set the specified foreground and background color. Default: Gets or sets the foreground color. Default: Gets or sets the background color. Default: Checks whether the specified log event matches the condition (if any). Writes log messages to the console. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Should logging being paused/stopped because of the race condition bug in Console.Writeline? Console.Out.Writeline / Console.Error.Writeline could throw 'IndexOutOfRangeException', which is a bug. See https://stackoverflow.com/questions/33915790/console-out-and-console-error-race-condition-error-in-a-windows-service-written and https://connect.microsoft.com/VisualStudio/feedback/details/2057284/console-out-probable-i-o-race-condition-issue-in-multi-threaded-windows-service Full error: Error during session close: System.IndexOutOfRangeException: Probable I/ O race condition detected while copying memory. The I/ O package is not thread safe by default. In multi-threaded applications, a stream must be accessed in a thread-safe way, such as a thread - safe wrapper returned by TextReader's or TextWriter's Synchronized methods.This also applies to classes like StreamWriter and StreamReader. Obsolete and replaced by with NLog v5. Gets or sets a value indicating whether to send the log messages to the standard error instead of the standard output. Gets or sets a value indicating whether to send the log messages to the standard error instead of the standard output. The encoding for writing messages to the . Gets or sets a value indicating whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) Default: Gets or sets a value indicating whether to auto-flush after Default: . Normally not required as standard Console.Out will have = true, but not when pipe to file Gets or sets whether to force (slower) instead of the faster internal buffering. Default: Gets or sets whether to activate internal buffering to allow batch writing, instead of using Default: Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Highlighting rule for Win32 colorful console. Initializes a new instance of the class. Initializes a new instance of the class. The text to be matched.. Color of the foreground. Color of the background. Gets or sets the condition that must be met before scanning the row for highlight of words Default: Gets or sets the text to be matched for Highlighting. Default: Gets or sets the list of words to be matched for Highlighting. Gets or sets a value indicating whether to match whole words only. Default: Gets or sets a value indicating whether to ignore case when comparing texts. Default: Gets or sets the foreground color. Default: Gets or sets the background color. Default: Scans the for words that should be highlighted. List of words with start-position (Key) and word-length (Value) Checks whether the specified log event matches the condition (if any). Writes log messages to the attached managed debugger. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Outputs log messages through See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Outputs the rendered logging event through The logging event. Mock target - useful for testing. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Gets the number of times this target has been called. Gets the last message rendered by this target. Default class for serialization of values to JSON format. Singleton instance of the serializer. Private. Use Returns a serialization of an object into JSON format. The object to serialize to JSON. Serialized value. Returns a serialization of an object into JSON format. The object to serialize to JSON. serialization options Serialized value. Serialization of the object in JSON format to the destination StringBuilder The object to serialize to JSON. Write the resulting JSON to this destination. Object serialized successfully (true/false). Serialization of the object in JSON format to the destination StringBuilder The object to serialize to JSON. Write the resulting JSON to this destination. serialization options Object serialized successfully (true/false). Serialization of the object in JSON format to the destination StringBuilder The object to serialize to JSON. Write the resulting JSON to this destination. serialization options The objects in path (Avoid cyclic reference loop). The current depth (level) of recursion. Object serialized successfully (true/false). No quotes needed for this type? Checks the object if it is numeric TypeCode for the object Accept fractional types as numeric type. Checks input string if it needs JSON escaping, and makes necessary conversion Destination Builder Input string all options JSON escaped string Checks input string if it needs JSON escaping, and makes necessary conversion Destination Builder Input string Should non-ASCII characters be encoded JSON escaped string Writes log message to the Event Log. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Max size in characters (limitation of the EventLog API). Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. Initializes a new instance of the class. Gets or sets the name of the machine on which Event Log service is running. Default: Gets or sets the layout that renders event ID. Default: ${event-properties:item=EventId} Gets or sets the layout that renders event Category. Default: Optional entry type. When not set, or when not convertible to then determined by Default: Gets or sets the value to be used as the event Source. [Required] Default: Gets or sets the name of the Event Log to write to. This can be System, Application or any user-defined name. [Required] Default: Application Gets or sets the message length limit to write to the Event Log. Default: Gets or sets the maximum Event log size in kilobytes. MaxKilobytes cannot be less than 64 or greater than 4194240 or not a multiple of 64. If null, the value will not be specified while creating the Event log. Gets or sets the action to take if the message is larger than the option. Default: Performs installation which requires administrative permissions. The installation context. Performs uninstallation which requires administrative permissions. The installation context. Determines whether the item is installed. The installation context. Value indicating whether the item is installed or null if it is not possible to determine. Get the entry type for logging the message. The logging event - for rendering the Get the source, if and only if the source is fixed. null when not Internal for unit tests (re-)create an event source, if it isn't there. Works only with fixed source names. The source name. If source is not fixed (see , then pass null or . always throw an Exception when there is an error A wrapper for Windows event log. A wrapper for the property . A wrapper for the property . A wrapper for the property . A wrapper for the property . Indicates whether an event log instance is associated. A wrapper for the method . Creates a new association with an instance of the event log. A wrapper for the static method . A wrapper for the static method . A wrapper for the static method . A wrapper for the static method . The implementation of , that uses Windows . Creates a new association with an instance of Windows . Action that should be taken if the message is greater than the max message size allowed by the Event Log. Truncate the message before writing to the Event Log. Split the message and write multiple entries to the Event Log. Discard of the message. It will not be written to the Event Log. Handles the actual file-operations on disk Writes the specified bytes to a file. The bytes array. The bytes array offset. The number of bytes. - Only strict scan for sequence-number (GetTodaysArchiveFiles) when having input "fileLastWriteTime" - Expect optional DateTime-part to be "sortable" (when missing birthtime) - Trim away sequencer-number, so not part of sorting - Use DateTime part from FileSystem for ordering by Date-only, and sort by FileName Handles the actual file-operations on disk Called just before opening a new log-file File-name of the new log-file The first LogEvent for the new log-file Previous file-write-time File-path-suffix for the new log-file Updated for the new file. Legacy archive logic with file-move of active-file to file-path specified by Kept mostly for legacy reasons, because archive operation can fail because of file-locks by other applications (or by multi-process logging). Avoid using when possible, and instead rely on only using and . Rolls the active-file to the next sequence-number Deletes/truncates the active logging-file when archive-roll-event is triggered Modes of archiving files based on time. Don't archive based on time. Archive every new year. Archive every new month. Archive every new day. Archive every new hour. Archive every new minute. Archive every Sunday. Archive every Monday. Archive every Tuesday. Archive every Wednesday. Archive every Thursday. Archive every Friday. Archive every Saturday. FileTarget for writing formatted messages to one or more log-files. See NLog Wiki Documentation on NLog Wiki Gets or sets the name of the file to write to. [Required] Default: . When not absolute path then relative path will be resolved against . The FileName Layout supports layout-renderers, where a single FileTarget can write to multiple files. The following value makes NLog write logging events to files based on the log level in the directory where the application runs. ${basedir}/${level}.log All Debug messages will go to Debug.log, all Info messages will go to Info.log and so on. You can combine as many of the layout renderers as you want to produce an arbitrary log file name. Gets or sets a value indicating whether to create directories if they do not exist. Default: . Setting this to may improve performance a bit, but will always fail when attempt writing to a non-existing directory. Gets or sets a value indicating whether to delete old log file on startup. Default: . When current log-file exists, then it is deleted (and resetting sequence number) Gets or sets a value indicating whether to replace file contents on each write instead of appending log message at the end. Default: Gets or sets a value indicating whether to keep log file open instead of opening and closing it on each logging event. Default: . KeepFileOpen = gives the best performance, and ensure the file-lock is not lost to other applications.
KeepFileOpen = gives the best compatibility, but slow performance and lead to file-locking issues with other applications.
Gets or sets a value indicating whether to enable log file(s) to be deleted. Default: Gets or sets the line ending mode. Default: Gets or sets a value indicating whether to automatically flush the file buffers after each log message. Default: Gets or sets the maximum number of files to be kept open. Default: . Higher number might improve performance when single FileTarget is writing to many files (such as splitting by loglevel or by logger-name). Files are closed in LRU (least recently used) ordering, so files unused for longest period are closed first. Careful with number higher than 10-15, because a large number of open files consumes system resources. Gets or sets the maximum number of seconds that files are kept open. Zero or negative means disabled. Default: Gets or sets the maximum number of seconds before open files are flushed. Zero or negative means disabled. Default: Gets or sets the log file buffer size in bytes. Default: Gets or sets the file encoding. Default: Gets or sets whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write Default: Gets or sets a value indicating whether to write BOM (byte order mark) in created files. Default: (Unless UTF16 / UTF32) Gets or sets a value indicating whether any existing log-file should be archived on startup. Default: Gets or sets whether to write the Header on initial creation of file appender, even if the file is not empty. Default value is , which means only write header when initial file is empty (Ex. ensures valid CSV files) Default: . Alternative use to ensure each application session gets individual log-file. Gets or sets a value specifying the date format when using . Obsolete and only here for Legacy reasons, instead use . Default: Gets or sets the size in bytes above which log files will be automatically archived. Zero or negative means disabled. Default: Gets or sets a value indicating whether to trigger archive operation based on time-period, by moving active-file to file-path specified by Default: . Archive move operation only works if is static in nature, and not rolling automatically because of ${date} or ${shortdate} NLog FileTarget probes the file-birthtime to recognize when time-period has passed, but file-birthtime is not supported by all filesystems. Legacy archive logic where file-archive-logic moves active file to path specified by , and then recreates the active file. Use to control suffix format, instead of now obsolete token {#} Default: . Archive file-move operation only works if is static in nature, and not rolling automatically because of ${date} or ${shortdate} . Legacy archive file-move operation can fail because of file-locks, so file-archiving can stop working because of environment issues (Other applications locking files). Avoid using when possible, and instead rely on only using and . Gets or sets the maximum number of archive files that should be kept. Negative means disabled. Default: Gets or sets the maximum days of archive files that should be kept. Zero or negative means disabled. Default: Gets or sets the way file archives are numbered. Obsolete and only here for Legacy reasons, instead use . Default: Sequence Gets or sets the format-string to convert archive sequence-number by using string.Format Default: _{0:00} . Ex. to prefix archive sequence number with leading zero's then one can use _{0:000} . Legacy archive-logic with can use suffix _{1:yyyyMMdd}_{0:00} . Gets or sets a value indicating whether the footer should be written only when the file is archived. Default: Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Flushes all pending file operations. The asynchronous continuation. Formats the log event for write. The log event to be formatted. for the result. Calculate the DateTime of the requested day of the week. The DateTime of the previous log event. The next occurring day of the week to return a DateTime for. The DateTime of the next occurring dayOfWeek. For example: if previousLogEventTimestamp is Thursday 2017-03-02 and dayOfWeek is Sunday, this will return Sunday 2017-03-05. If dayOfWeek is Thursday, this will return *next* Thursday 2017-03-09. The sequence of to be written in a file after applying any formatting and any transformations required from the . The layout used to render output message. Sequence of to be written. Usually it is used to render the header and hooter of the files. Creates stream for appending to the specified Path of the file to be written Wanted internal buffer size for the stream Stream for appending to the file Controls the text and color formatting for Creates a TextWriter for the console to start building a colored text message Active console stream Optional StringBuilder to optimize performance TextWriter for the console Releases the TextWriter for the console after having built a colored text message (Restores console colors) Colored TextWriter Active console stream Original foreground color for console (If changed) Original background color for console (If changed) Flush TextWriter Changes foreground color for the Colored TextWriter Colored TextWriter New foreground color for the console Old previous backgroundColor color for the console Old foreground color for the console Changes backgroundColor color for the Colored TextWriter Colored TextWriter New backgroundColor color for the console Old previous backgroundColor color for the console Old backgroundColor color for the console Restores console colors back to their original state Colored TextWriter Original foregroundColor color for the console Original backgroundColor color for the console Writes multiple characters to console in one operation (faster) Colored TextWriter Output Text Start Index End Index Writes single character to console Colored TextWriter Output Text Writes whole string and completes with newline Colored TextWriter Output Text Default row highlight rules for the console printer Options for JSON serialization Add quotes around object keys? Default: Format provider for value Default: Format string for value Default: Should non-ascii characters be encoded. Default: Should forward slashes be escaped? If , / will be converted to \/ Default: Serialize enum as integer value. Default: Gets or sets the option to suppress the extra spaces in the output json. Default: Should dictionary keys be sanitized. All characters must either be letters, numbers or underscore character (_). Any other characters will be converted to underscore character (_) Default: How far down the rabbit hole should the Json Serializer go with object-reflection before stopping Default: Line ending mode. Insert platform-dependent sequence after each line. Insert CR LF sequence (ASCII 13, ASCII 10) after each line. Insert CR character (ASCII 13) after each line. Insert LF character (ASCII 10) after each line. Insert null terminator (ASCII 0) after each line. Do not insert any line ending. Gets the name of the LineEndingMode instance. Gets the new line characters (value) of the LineEndingMode instance. Initializes a new instance of . The mode name. The new line characters to be used. Returns the that corresponds to the supplied . The textual representation of the line ending mode, such as CRLF, LF, Default etc. Name is not case sensitive. The value, that corresponds to the . There is no line ending mode with the specified name. Compares two objects and returns a value indicating whether the first one is equal to the second one. The first level. The second level. The value of mode1.NewLineCharacters == mode2.NewLineCharacters. Compares two objects and returns a value indicating whether the first one is not equal to the second one. The first mode The second mode The value of mode1.NewLineCharacters != mode2.NewLineCharacters. Indicates whether the current object is equal to another object of the same type. if the current object is equal to the parameter; otherwise, . An object to compare with this object. Provides a type converter to convert objects to and from other representations. Writes log messages to in memory for programmatic retrieval. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Name of the target. Gets the list of logs gathered in the . Be careful when enumerating, as NLog target is blocked from writing during enumeration (blocks application logging) Gets or sets the max number of items to have in memory. Zero or Negative means no limit. Default: 0 Renders the logging event message and adds to The logging event. A parameter to MethodCall. Initializes a new instance of the class. Initializes a new instance of the class. The layout to use for parameter value. Initializes a new instance of the class. Name of the parameter. The layout. Initializes a new instance of the class. The name of the parameter. The layout. The type of the parameter. Gets or sets the name of the parameter. [Required] Default: Gets or sets the layout used for rendering the method-parameter value. [Required] Default: Obsolete and replaced by with NLog v4.6. Gets or sets the type of the parameter. Obsolete alias for Default: typeof(string) Gets or sets the type of the parameter. Default: typeof(string) Gets or sets the fallback value when result value is not available Default: Render Result Value Log event for rendering Result value when available, else fallback to defaultValue Calls the specified static method on each log message and passes contextual parameters to it. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Gets or sets the class name. Default: Gets or sets the method name. The method must be public and static. Use the AssemblyQualifiedName - Default: Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. Initializes a new instance of the class. Name of the target. Method to call on logevent. Calls the specified Method. Method parameters. The logging event. Calls the specified Method. Method parameters. The base class for all targets which call methods (local or remote). Manages parameters and type coercion. Initializes a new instance of the class. Gets the array of parameters to be passed. Prepares an array of parameters to be passed based on the logging event and calls DoInvoke(). The logging event. Calls the target DoInvoke method, and handles AsyncContinuation callback Method call parameters. The logging event. Calls the target method. Must be implemented in concrete classes. Method call parameters. Discards log messages. Used mainly for debugging and benchmarking. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Gets or sets a value indicating whether to perform layout calculation. Default: Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. Does nothing. Optionally it calculates the layout text but discards the results. The logging event. Represents logging target. Are all layouts in this target thread-agnostic, if so we don't precalculate the layouts The Max StackTraceUsage of all the in this Target Gets or sets the name of the target. [Required] Default: Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit NLog Layout are by default threadsafe, so multiple threads can be rendering logevents at the same time. This ensure high concurrency with no lock-congestion for the application-threads, especially when using or AsyncTaskTarget. But if using custom or that are not threadsafe, then this option can enabled to protect against thread-concurrency-issues. Allowing one to update to NLog 5.0 without having to fix custom/external layout-dependencies. Gets the object which can be used to synchronize asynchronous operations that must rely on the . Gets the logging configuration this target is part of. Gets a value indicating whether the target has been initialized. Initializes this instance. The configuration. Closes this instance. Closes the target. Flush any pending log messages (in case of asynchronous targets). The asynchronous continuation. Calls the on each volatile layout used by this target. This method won't prerender if all layouts in this target are thread-agnostic. The log event. Writes the log to the target. Log event to write. Writes the array of log events. The log events. Writes the array of log events. The log events. LogEvent is written to target, but target failed to successfully initialize Initializes this instance. The configuration. Closes this instance. Releases unmanaged and - optionally - managed resources. to release both managed and unmanaged resources; to release only unmanaged resources. Initializes the target before writing starts Closes the target to release any initialized resources Flush any pending log messages The asynchronous continuation parameter must be called on flush completed The asynchronous continuation to be called on flush completed. Writes logging event to the target destination Logging event to be written out. Writes async log event to the log target. Async Log event to be written out. Writes a log event to the log target, in a thread safe manner. Any override of this method has to provide their own synchronization mechanism. !WARNING! Custom targets should only override this method if able to provide their own synchronization mechanism. -objects are not guaranteed to be thread-safe, so using them without a SyncRoot-object can be dangerous. Log event to be written out. Writes an array of logging events to the log target. By default it iterates on all events and passes them to "Write" method. Inheriting classes can use this method to optimize batch writes. Logging events to be written out. Writes an array of logging events to the log target, in a thread safe manner. Any override of this method has to provide their own synchronization mechanism. !WARNING! Custom targets should only override this method if able to provide their own synchronization mechanism. -objects are not guaranteed to be thread-safe, so using them without a SyncRoot-object can be dangerous. Logging events to be written out. Merges (copies) the event context properties from any event info object stored in parameters of the given event info object. The event info object to perform the merge to. Renders the logevent into a string-result using the provided layout The layout. The logevent info. String representing log event. Renders the logevent into a result-value by using the provided layout The layout. The logevent info. Fallback value when no value available Result value when available, else fallback to defaultValue Resolve from DI Avoid calling this while handling a LogEvent, since random deadlocks can occur. Should the exception be rethrown? Upgrade to private protected when using C# 7.2 Obsolete and replaced by with NLog v5.2. Register a custom Target. Short-cut for registering to default Type of the Target. The target type-alias for use in NLog configuration Obsolete and replaced by with NLog v5.2. Register a custom Target. Short-cut for registering to default Type of the Target. The target type-alias for use in NLog configuration Marks class as logging target and attaches a type-alias name for use in NLog configuration. Initializes a new instance of the class. The target type-alias for use in NLog configuration. Gets or sets a value indicating whether to the target is a wrapper target (used to generate the target summary documentation page). Gets or sets a value indicating whether to the target is a compound target (used to generate the target summary documentation page). Attribute details for Initializes a new instance of the class. Initializes a new instance of the class. The name of the attribute. The layout of the attribute's value. Gets or sets the name of the property. [Required] Default: Gets or sets the layout used for rendering the property value. [Required] Default: Gets or sets the type of the property. Default: Gets or sets the fallback value when result value is not available Default: Gets or sets whether empty property value should be included in the output. Default: . Empty value is either null or empty string Render Result Value Log event for rendering Result value when available, else fallback to defaultValue Represents target that supports context capture of Properties + Nested-states See NLog Wiki [Target("MyFirst")] public sealed class MyFirstTarget : TargetWithContext { public MyFirstTarget() { this.Host = "localhost"; } public Layout Host { get; set; } protected override void Write(LogEventInfo logEvent) { string logMessage = this.RenderLogEvent(this.Layout, logEvent); string hostName = this.RenderLogEvent(this.Host, logEvent); return SendTheMessageToRemoteHost(hostName, logMessage); } private void SendTheMessageToRemoteHost(string hostName, string message) { // To be implemented } } Documentation on NLog Wiki Gets or sets the option to include all properties from the log events Default: Gets or sets whether to include the contents of the properties-dictionary. Default: Gets or sets whether to include the contents of the nested-state-stack. Default: Obsolete and replaced by with NLog v5. Gets or sets whether to include the contents of the -dictionary. Default: Obsolete and replaced by with NLog v5. Gets or sets whether to include the contents of the -stack. Default: Obsolete and replaced by with NLog v5. Gets or sets whether to include the contents of the -properties. Default: Obsolete and replaced by with NLog v5. Gets or sets whether to include the contents of the -stack. Default: Gets or sets a value indicating whether to include contents of the dictionary Default: Gets or sets a value indicating whether to include call site (class and method name) in the Default: Gets or sets a value indicating whether to include source info (file name and line number) in the Default: Gets the array of custom attributes to be passed into the logevent context List of property names to exclude when is Constructor Check if logevent has properties (or context properties) if properties should be included Checks if any context properties, and if any returns them as a single dictionary Dictionary with any context properties for the logEvent (Null if none found) Checks if any context properties, and if any returns them as a single dictionary Optional pre-allocated dictionary for the snapshot Dictionary with any context properties for the logEvent (Null if none found) Creates combined dictionary of all configured properties for logEvent Dictionary with all collected properties for logEvent Creates combined dictionary of all configured properties for logEvent Optional prefilled dictionary Dictionary with all collected properties for logEvent Generates a new unique name, when duplicate names are detected LogEvent that triggered the duplicate name Duplicate item name Item Value Dictionary of context values New (unique) value (or null to skip value). If the same value is used then the item will be overwritten Returns the captured snapshot of dictionary for the Dictionary with ScopeContext properties if any, else null Returns the captured snapshot of nested states from for the Collection of nested state objects if any, else null Takes snapshot of for the Optional pre-allocated dictionary for the snapshot Dictionary with GDC context if any, else null Takes snapshot of dictionary for the Optional pre-allocated dictionary for the snapshot Dictionary with ScopeContext properties if any, else null Take snapshot of a single object value from dictionary Log event ScopeContext Dictionary key ScopeContext Dictionary value Snapshot of ScopeContext property-value Include object value in snapshot Takes snapshot of nested states from for the Collection with stack items if any, else null Take snapshot of a single object value from nested states Log event nested state value Snapshot of stack item value Include object value in snapshot Take snapshot of a single object value Log event Key Name (null when NDC / NDLC) Object Value Snapshot of value Include object value in snapshot Returns the captured snapshot of for the Collection with NDLC context if any, else null Returns the captured snapshot of for the Dictionary with MDLC context if any, else null Internal Layout that allows capture of properties-dictionary Internal Layout that allows capture of nested-states-stack Represents target that supports string formatting using layouts. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Gets or sets the layout used to format log messages. [Required] Default: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Represents target that supports string formatting using layouts. Initializes a new instance of the class. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true} Gets or sets the footer. Default: Gets or sets the header. Default: Asynchronous request queue. Initializes a new instance of the AsyncRequestQueue class. Queue max size. The overflow action. Gets the number of requests currently in the queue. Enqueues another item. If the queue is overflown the appropriate action is taken as specified by . The log event info. Queue was empty before enqueue Dequeues a maximum of count items from the queue and adds returns the list containing them. Maximum number of items to be dequeued The array of log events. Dequeues into a preallocated array, instead of allocating a new one Maximum number of items to be dequeued Preallocated list Clears the queue. Gets or sets the queue max-size Gets or sets the action to be taken when there's no more room in the queue and another request is enqueued. Occurs when LogEvent has been dropped, because internal queue is full and set to Occurs when internal queue size is growing, because internal queue is full and set to Raise event when queued element was dropped because of queue overflow Dropped queue item Raise event when RequestCount overflow current requests count Provides asynchronous, buffered execution of target writes. See NLog Wiki Documentation on NLog Wiki

Asynchronous target wrapper allows the logger code to execute more quickly, by queuing messages and processing them in a separate thread. You should wrap targets that spend a non-trivial amount of time in their Write() method with asynchronous target to speed up logging.

Because asynchronous logging is quite a common scenario, NLog supports a shorthand notation for wrapping all targets with AsyncWrapper. Just add async="true" to the <targets/> element in the configuration file.

... your targets go here ... ]]>

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The wrapped target. Initializes a new instance of the class. The wrapped target. Initializes a new instance of the class. The wrapped target. Maximum number of requests in the queue. The action to be taken when the queue overflows. Gets or sets the number of log events that should be processed in a batch by the lazy writer thread. Default: Gets or sets the time in milliseconds to sleep between batches. (1 or less means trigger on new activity) Default: ms Occurs when LogEvent has been dropped, because internal queue is full and set to Occurs when internal queue size is growing, because internal queue is full and set to Gets or sets the action to be taken when the lazy writer thread request queue count exceeds the set limit. Default: Gets or sets the limit on the number of requests in the lazy writer thread request queue. Default: Gets or sets the number of batches of to write before yielding into Default: . Better performance when writing small batches, than single large batch. Gets or sets whether to use the locking queue, instead of a lock-free concurrent queue Default: . Queue with Monitor.Lock is less concurrent when many logger threads, but reduces memory allocation Gets the queue of lazy writer thread requests. Schedules a flush of pending events in the queue (if any), followed by flushing the WrappedTarget. The asynchronous continuation. Initializes the target by starting the lazy writer timer. Shuts down the lazy writer timer. Starts the lazy writer thread which periodically writes queued log messages. Attempts to start an instant timer-worker-thread which can write queued log messages. Returns when scheduled a timer-worker-thread Stops the lazy writer thread. Adds the log event to asynchronous queue to be processed by the lazy writer thread. The log event. The is called to ensure that the log event can be processed in another thread. Write to queue without locking The action to be taken when the queue overflows. Grow the queue. Discard the overflowing item. Block until there's more room in the queue. Causes a flush on a wrapped target if LogEvent satisfies the . If condition isn't set, flushes on each write. See NLog Wiki Documentation on NLog Wiki

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Gets or sets the condition expression. Log events who meet this condition will cause a flush on the wrapped target. Default: Delay the flush until the LogEvent has been confirmed as written Default: . When not explicitly set, then automatically disabled when or AsyncTaskTarget Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush Default: Initializes a new instance of the class. Initializes a new instance of the class. The wrapped target. Name of the target Initializes a new instance of the class. The wrapped target. Forwards the call to the .Write() and calls on it if LogEvent satisfies the flush condition or condition is null. Logging event to be written out. Schedules a flush operation, that triggers when all pending flush operations are completed (in case of asynchronous targets). The asynchronous continuation. A target that buffers log events and sends them in batches to the wrapped target. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The wrapped target. Initializes a new instance of the class. The wrapped target. Initializes a new instance of the class. The wrapped target. Size of the buffer. Initializes a new instance of the class. The wrapped target. Size of the buffer. The flush timeout. Initializes a new instance of the class. The wrapped target. Size of the buffer. The flush timeout. The action to take when the buffer overflows. Gets or sets the number of log events to be buffered. Default: Gets or sets the timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. Default: . Zero or Negative means disabled. Gets or sets a value indicating whether to use sliding timeout. Default: . This value determines how the inactivity period is determined. When the inactivity timer is reset after each write, if - inactivity timer will count from the first event written to the buffer. Gets or sets the action to take if the buffer overflows. Default: . Setting to will flush the entire buffer to the wrapped target. Setting to will replace the oldest event with new events without sending events down to the wrapped target. Flushes pending events in the buffer (if any), followed by flushing the WrappedTarget. The asynchronous continuation. Closes the target by flushing pending events in the buffer (if any). Adds the specified log event to the buffer and flushes the buffer in case the buffer gets full. The log event. The action to be taken when the buffer overflows. Flush the content of the buffer. Discard the oldest item. A base class for targets which wrap other (multiple) targets and provide various forms of target routing. Initializes a new instance of the class. The targets. Gets the collection of targets managed by this compound target. Flush any pending log messages for all wrapped targets. The asynchronous continuation. Concurrent Asynchronous request queue based on Initializes a new instance of the AsyncRequestQueue class. Queue max size. The overflow action. Gets the number of requests currently in the queue. Only for debugging purposes Enqueues another item. If the queue is overflown the appropriate action is taken as specified by . The log event info. Queue was empty before enqueue Dequeues a maximum of count items from the queue and adds returns the list containing them. Maximum number of items to be dequeued The array of log events. Dequeues into a preallocated array, instead of allocating a new one Maximum number of items to be dequeued Preallocated list Clears the queue. Provides fallback-on-error. See NLog Wiki Documentation on NLog Wiki

This example causes the messages to be written to server1, and if it fails, messages go to server2.

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The targets. Initializes a new instance of the class. The targets. Gets or sets a value indicating whether to return to the first target after any successful write. Default: Gets or sets whether to enable batching, but fallback will be handled individually Default: Forwards the log event to the sub-targets until one of them succeeds. The log event. Forwards the log event to the sub-targets until one of them succeeds. Filtering rule for . Initializes a new instance of the FilteringRule class. Initializes a new instance of the FilteringRule class. Condition to be tested against all events. Filter to apply to all log events when the first condition matches any of them. Gets or sets the condition to be tested. Gets or sets the resulting filter to be applied when the condition matches. Filters log entries based on a condition. See NLog Wiki Documentation on NLog Wiki

This example causes the messages not contains the string '1' to be ignored.

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The wrapped target. The condition. Initializes a new instance of the class. The wrapped target. The condition. Gets or sets the condition expression. Log events who meet this condition will be forwarded to the wrapped target. Default: Gets or sets the filter. Log events who evaluates to will be discarded [Required] Default: Checks the condition against the passed log event. If the condition is met, the log event is forwarded to the wrapped target. Log event. A target that buffers log events and sends them in batches to the wrapped target. See NLog Wiki Documentation on NLog Wiki Identifier to perform group-by [Required] Default: Initializes a new instance of the class. Initializes a new instance of the class. The wrapped target. Initializes a new instance of the class. The name of the target. The wrapped target. Initializes a new instance of the class. The name of the target. The wrapped target. Group by identifier. Limits the number of messages written per timespan to the wrapped target. See NLog Wiki Documentation on NLog Wiki Initializes a new instance of the class. Initializes a new instance of the class. The name of the target. The wrapped target. Initializes a new instance of the class. The wrapped target. Initializes a new instance of the class. The wrapped target. Maximum number of messages written per interval. Interval in which the maximum number of messages can be written. Gets or sets the maximum allowed number of messages written per . Default: . Messages received after has been reached in the current will be discarded. Gets or sets the interval in which messages will be written up to the number of messages. Default: hour. Messages received after has been reached in the current will be discarded. Gets the number of written in the current . Initializes the target and resets the current Interval and . Writes log event to the wrapped target if the current is lower than . If the is already reached, no log event will be written to the wrapped target. resets when the current is expired. Log event to be written out. Arguments for events. Initializes a new instance of the class. LogEvent that have been dropped Instance of that was dropped by Raises by when queue is full and set to By default queue doubles it size. Initializes a new instance of the class. Required queue size Current queue size New queue size Current requests count Filters buffered log entries based on a set of conditions that are evaluated on a group of events. See NLog Wiki Documentation on NLog Wiki

This example works like this. If there are no Warn,Error or Fatal messages in the buffer only Info messages are written to the file, but if there are any warnings or errors, the output includes detailed trace (levels >= Debug).

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The wrapped target. Gets or sets the default filter to be applied when no specific rule matches. Default: Gets the collection of filtering rules. The rules are processed top-down and the first rule that matches determines the filtering condition to be applied to log events. Evaluates all filtering rules to find the first one that matches. The matching rule determines the filtering condition to be applied to all items in a buffer. If no condition matches, default filter is applied to the array of log events. Array of log events to be post-filtered. Evaluate all the rules to get the filtering condition Sends log messages to a randomly selected target. See NLog Wiki Documentation on NLog Wiki

This example causes the messages to be written to either file1.txt or file2.txt chosen randomly on a per-message basis.

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The targets. Initializes a new instance of the class. The targets. Forwards the log event to one of the sub-targets. The sub-target is randomly chosen. The log event. Repeats each log event the specified number of times. See NLog Wiki Documentation on NLog Wiki

This example causes each log message to be repeated 3 times.

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The wrapped target. The repeat count. Initializes a new instance of the class. The wrapped target. The repeat count. Gets or sets the number of times to repeat each log message. Default: Forwards the log message to the by calling the method times. The log event. Retries in case of write error. See NLog Wiki Documentation on NLog Wiki

This example causes each write attempt to be repeated 3 times, sleeping 1 second between attempts if first one fails.

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The wrapped target. The retry count. The retry delay milliseconds. Initializes a new instance of the class. The wrapped target. The retry count. The retry delay milliseconds. Gets or sets the number of retries that should be attempted on the wrapped target in case of a failure. Default: Gets or sets the time to wait between retries in milliseconds. Default: ms Gets or sets whether to enable batching, and only apply single delay when a whole batch fails Default: Special SyncObject to allow closing down Target while busy retrying Writes the specified log event to the wrapped target, retrying and pausing in case of an error. The log event. Writes the specified log event to the wrapped target in a thread-safe manner. The log event. Writes the specified log event to the wrapped target, retrying and pausing in case of an error. The log event. Distributes log events to targets in a round-robin fashion. See NLog Wiki Documentation on NLog Wiki

This example causes the messages to be written to either file1.txt or file2.txt. Each odd message is written to file2.txt, each even message goes to file1.txt.

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The targets. Initializes a new instance of the class. The targets. Ensures forwarding happens without holding lock Forwards the write to one of the targets from the collection. The log event. The writes are routed in a round-robin fashion. The first log event goes to the first target, the second one goes to the second target and so on looping to the first target when there are no more targets available. In general request N goes to Targets[N % Targets.Count]. Writes log events to all targets. See NLog Wiki Documentation on NLog Wiki

This example causes the messages to be written to both file1.txt or file2.txt

To set up the target in the configuration file, use the following syntax:

To set up the log target programmatically use code like this:

Initializes a new instance of the class. Initializes a new instance of the class. Name of the target. The targets. Initializes a new instance of the class. The targets. Forwards the specified log event to all sub-targets. The log event. Writes an array of logging events to the log target. By default it iterates on all events and passes them to "Write" method. Inheriting classes can use this method to optimize batch writes. Logging events to be written out. Base class for targets wrap other (single) targets. Gets or sets the target that is wrapped by this target. [Required] Default: Writes logging event to the log target. Must be overridden in inheriting classes. Logging event to be written out. Current local time retrieved directly from DateTime.Now. See NLog Wiki Documentation on NLog Wiki Gets current local time directly from DateTime.Now. Converts the specified system time to the same form as the time value originated from this time source. The system originated time value to convert. The value of converted to local time. Current UTC time retrieved directly from DateTime.UtcNow. See NLog Wiki Documentation on NLog Wiki Gets current UTC time directly from DateTime.UtcNow. Converts the specified system time to the same form as the time value originated from this time source. The system originated time value to convert. The value of converted to UTC time. Fast time source that updates current time only once per tick (15.6 milliseconds). See NLog Wiki Documentation on NLog Wiki Gets raw uncached time from derived time source. Gets current time cached for one system tick (15.6 milliseconds). Fast local time source that is updated once per tick (15.6 milliseconds). See NLog Wiki Documentation on NLog Wiki Gets uncached local time directly from DateTime.Now. Converts the specified system time to the same form as the time value originated from this time source. The system originated time value to convert. The value of converted to local time. Fast UTC time source that is updated once per tick (15.6 milliseconds). See NLog Wiki Documentation on NLog Wiki Gets uncached UTC time directly from DateTime.UtcNow. Converts the specified system time to the same form as the time value originated from this time source. The system originated time value to convert. The value of converted to UTC time. Defines source of current time. See NLog Wiki Documentation on NLog Wiki Gets current time. Gets or sets current global time source used in all log events. Default time source is . Returns a that represents this instance. A that represents this instance. Converts the specified system time to the same form as the time value originated from this time source. The system originated time value to convert. The value of converted to the same form as time values originated from this source. There are situations when NLog have to compare the time originated from TimeSource to the time originated externally in the system. To be able to provide meaningful result of such comparisons the system time must be expressed in the same form as TimeSource time. Examples: - If the TimeSource provides time values of local time, it should also convert the provided to the local time. - If the TimeSource shifts or skews its time values, it should also apply the same transform to the given . Marks class as a time source and assigns a name to it. Initializes a new instance of the class. The Time type-alias for use in NLog configuration. Initializes a new instance of the class with the specified member types. The types of members dynamically accessed. Gets the which specifies the type of members dynamically accessed. Specifies the types of members that are dynamically accessed. This enumeration has a attribute that allows a bitwise combination of its member values. Specifies no members. Specifies the default, parameterless public constructor. Specifies all public constructors. Specifies all non-public constructors. Specifies all public methods. Specifies all non-public methods. Specifies all public fields. Specifies all non-public fields. Specifies all public nested types. Specifies all non-public nested types. Specifies all public properties. Specifies all non-public properties. Specifies all public events. Specifies all non-public events. Specifies all interfaces implemented by the type. Specifies all members. Suppresses reporting of a specific rule violation, allowing multiple suppressions on a single code artifact. is different than in that it doesn't have a . So it is always preserved in the compiled assembly. Initializes a new instance of the class, specifying the category of the tool and the identifier for an analysis rule. The category for the attribute. The identifier of the analysis rule the attribute applies to. Gets the category identifying the classification of the attribute. The property describes the tool or tool analysis category for which a message suppression attribute applies. Gets the identifier of the analysis tool rule to be suppressed. Concatenated together, the and properties form a unique check identifier. Gets or sets the scope of the code that is relevant for the attribute. The Scope property is an optional argument that specifies the metadata scope for which the attribute is relevant. Gets or sets a fully qualified path that represents the target of the attribute. The property is an optional argument identifying the analysis target of the attribute. An example value is "System.IO.Stream.ctor():System.Void". Because it is fully qualified, it can be long, particularly for targets such as parameters. The analysis tool user interface should be capable of automatically formatting the parameter. Gets or sets an optional argument expanding on exclusion criteria. The property is an optional argument that specifies additional exclusion where the literal metadata target is not sufficiently precise. For example, the cannot be applied within a method, and it may be desirable to suppress a violation against a statement in the method that will give a rule violation, but not against all statements in the method. Gets or sets the justification for suppressing the code analysis message. Indicates that the specified method requires dynamic access to code that is not referenced statically, for example through . This allows tools to understand which methods are unsafe to call when removing unreferenced code from an application. Initializes a new instance of the class with the specified message. A message that contains information about the usage of unreferenced code. Gets a message that contains information about the usage of unreferenced code. Gets or sets an optional URL that contains more information about the method, why it requires unreferenced code, and what options a consumer has to deal with it.