C:\work\NLog\build\mono-2.0\bin\NLog Condition and expression. Creates a new instance of and assigns its Left and Right properties; Left hand side of the AND expression. Right hand side of the AND expression. The left hand side of the AND expression. The right hand side of the AND expression. Evaluates the expression by evaluating and recursively. Evaluation context. The value of the conjunction operator. Returns a string representation of this expression. (Left) or (Right) string Adds all layouts used by this expression to the specified collection. The collection to add layouts to. Base class for representing nodes in condition expression trees. Evaluates the expression. Evaluation context. Expression result. Adds all layouts used by this expression to the specified collection. The collection to add layouts to. A collection of elements of type ConditionExpression Initializes a new empty instance of the ConditionExpressionCollection class. Initializes a new instance of the ConditionExpressionCollection class, containing elements copied from an array. The array whose elements are to be added to the new ConditionExpressionCollection. Initializes a new instance of the ConditionExpressionCollection class, containing elements copied from another instance of ConditionExpressionCollection The ConditionExpressionCollection whose elements are to be added to the new ConditionExpressionCollection. Type-specific enumeration class, used by ConditionExpressionCollection.GetEnumerator. Gets or sets the ConditionExpression at the given index in this ConditionExpressionCollection. Adds the elements of an array to the end of this ConditionExpressionCollection. The array whose elements are to be added to the end of this ConditionExpressionCollection. Adds the elements of another ConditionExpressionCollection to the end of this ConditionExpressionCollection. The ConditionExpressionCollection whose elements are to be added to the end of this ConditionExpressionCollection. Adds an instance of type ConditionExpression to the end of this ConditionExpressionCollection. The ConditionExpression to be added to the end of this ConditionExpressionCollection. Determines whether a specfic ConditionExpression value is in this ConditionExpressionCollection. The ConditionExpression value to locate in this ConditionExpressionCollection. true if value is found in this ConditionExpressionCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this ConditionExpressionCollection The ConditionExpression value to locate in the ConditionExpressionCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the ConditionExpressionCollection at the specified index The index at which the ConditionExpression is to be inserted. The ConditionExpression to insert. Removes the first occurrence of a specific ConditionExpression from this ConditionExpressionCollection. The ConditionExpression value to remove from this ConditionExpressionCollection. Returns an enumerator that can iterate through the elements of this ConditionExpressionCollection. An object that implements System.Collections.IEnumerator. Condition layout expression (represented by a string literal with embedded ${}) Creates a new instance of and initializes the layout. Evaluates the expression by calculating the value of the layout in the specified evaluation context. Evaluation context The value of the layout. Returns a string representation of this expression. String literal in single quotes. Adds all layouts used by this expression to the specified collection. The collection to add layouts to. Condition level expression (represented by the level keyword). Creates a new instance of . Evaluates to the current log level. Evaluation context. Ignored. The object representing current log level. Returns a string representation of the expression. level string. Condition literal expression (numeric, LogLevel.XXX, true or false) Creates a new instance of and initializes it with the specified value. Evaluates the expression. Evaluation context. The literal value as passed in the constructor. Returns a string representation of the expression. The literal value. Condition logger name expression (represented by the logger keyword). Creates a new instance of . Evaluates to the logger name. evaluation context The logger name Returns a string representation of this expression a logger string Condition message expression (represented by the message keyword). Creates a new instance of . Evaluates to the logger message. evaluation context The logger message Returns a string representation of this expression a message string Condition method invocation expression (represented by method(p1,p2,p3) syntax). Adds all layouts used by this expression to the specified collection. The collection to add layouts to. A bunch of utility methods (mostly predicates) which can be used in condition expressions. Parially inspired by XPath 1.0. Compares two objects for equality. The first object The second object true when two objects are equal, false otherwise. Determines whether the second string is a substring of the first one. The first string The second string true when the second string is a substring of the first string, false otherwise. Determines whether the second string is a prefix of the first one. The first string The second string true when the second string is a prefix of the first string, false otherwise. Determines whether the second string is a suffix of the first one. The first string The second string true when the second string is a prefix of the first string, false otherwise. Returns the length of a string. A string. The length of a string. Condition not expression. Adds all layouts used by this expression to the specified collection. The collection to add layouts to. Condition or expression. Creates a new instance of and assigns its Left and Right properties; Left hand side of the OR expression. Right hand side of the OR expression. Evaluates the expression by evaluating and recursively. Evaluation context. The value of the alternative operator. Returns a string representation of this expression. (Left) or (Right) string Adds all layouts used by this expression to the specified collection. The collection to add layouts to. Exception during parsing of condition expression Creates a new instance of . Creates a new instance of . Error message Creates a new instance of . Error message Inner exception Creates a new instance of . Serialization info Streaming context Condition parser. Turns a string representation of condition expression into an expression tree. 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 Condition relational (==, !=, <, <=, > or >=) expression. Adds all layouts used by this expression to the specified collection. The collection to add layouts to. Relational operators used in conditions. Equality (==) Inequality (!=) Less than (<) Greater than (>) Less than or equal (<=) Greater than or equal (>=) Hand-written tokenizer for conditions. Token types for condition expressions. Attribute used to mark string parameters that accept conditions. Creates a new instance of AcceptsLayoutAttribute Attribute used to mark string parameters that accept layouts. Creates a new instance of AcceptsLayoutAttribute Used to mark configurable parameters which are arrays. Specifies the mapping between XML elements and .NET types. Creates a new instance of ArrayParameterAttribute specifying the element type and configuration element name. The type of the array item The XML element name that represents the item. The .NET type of the array item The XML element name. NLog configuration section handler class for configuring NLog from App.config Attribute used to mark the default parameters for layout renderers. Creates a new DefaultParameterAttribute object. Keeps logging configuration and provides simple API to modify it. Creates new instance of LoggingConfiguration object. The collection of logging rules A collection of file names which should be watched for changes by NLog. Registers the specified target object under a given name. Name of the target. The target object. Removes the specified named target. Name of the target. Finds the target with the specified name. The name of the target to be found. Found target or when the target is not found. Called by LogManager when one of the log configuration files changes. A new instance of that represents the updated configuration. Flushes any pending log messages on all appenders. Returns a collection of named targets specified in the configuration. A object that contains a list of named targets. Unnamed targets (such as those wrapped by other targets) are not returned. Closes all targets and releases any unmanaged resources. Represents a logging rule. An equivalent of <logger /> configuration element. Initializes a new instance of . Initializes a new instance of by setting the logger name pattern, minimum logging level and the target to be written to when logger name and log level match. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Minimum log level needed to trigger this rule. Target to be written to when the rule matches. Initializes a new instance of by setting the logger name pattern and the target to be written to when logger name matches. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. Target to be written to when the rule matches. By default no logging levels are defined. You should call and to set them. A collection of targets that should be written to when this rule matches. A collection of child rules to be evaluated when this rule matches. A collection of filters to be checked before writing to targets. Quit processing any further rule when this one matches. Logger name pattern. Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends but not anywhere else. Returns a string representation of . Used for debugging. Enables logging for a particular level. Level to be enabled. Disables logging for a particular level. Level to be disabled. Checks whether te particular log level is enabled for this rule. Level to be checked when the log level is enabled, otherwise. Checks whether given name matches the logger name pattern. String to be matched when the name matches, otherwise. A collection of elements of type LoggingRule Initializes a new empty instance of the LoggingRuleCollection class. Initializes a new instance of the LoggingRuleCollection class, containing elements copied from an array. The array whose elements are to be added to the new LoggingRuleCollection. Initializes a new instance of the LoggingRuleCollection class, containing elements copied from another instance of LoggingRuleCollection The LoggingRuleCollection whose elements are to be added to the new LoggingRuleCollection. Type-specific enumeration class, used by LoggingRuleCollection.GetEnumerator. Returns the current object. Returns the current object. Advances to the next object. A result Resets the enumerator. Gets or sets the LoggingRule at the given index in this LoggingRuleCollection. Adds the elements of an array to the end of this LoggingRuleCollection. The array whose elements are to be added to the end of this LoggingRuleCollection. Adds the elements of another LoggingRuleCollection to the end of this LoggingRuleCollection. The LoggingRuleCollection whose elements are to be added to the end of this LoggingRuleCollection. Adds an instance of type LoggingRule to the end of this LoggingRuleCollection. The LoggingRule to be added to the end of this LoggingRuleCollection. Determines whether a specfic LoggingRule value is in this LoggingRuleCollection. The LoggingRule value to locate in this LoggingRuleCollection. true if value is found in this LoggingRuleCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this LoggingRuleCollection The LoggingRule value to locate in the LoggingRuleCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the LoggingRuleCollection at the specified index The index at which the LoggingRule is to be inserted. The LoggingRule to insert. Removes the first occurrence of a specific LoggingRule from this LoggingRuleCollection. The LoggingRule value to remove from this LoggingRuleCollection. Returns an enumerator that can iterate through the elements of this LoggingRuleCollection. An object that implements System.Collections.IEnumerator. Exception during configuration Creates a new instance of . Creates a new instance of . Error message Creates a new instance of . Error message Inner exception Creates a new instance of . Serialization info Streaming context Marks classes and properties as NOT supporting particular runtime framework and operating system. Creates a new instance of . Attribute used to mark the required parameters for targets, layout targets and filters. Creates a new RequiredParameterAttribute object. Supported runtime frameworks. If you add anything here, make sure to add the appropriate detection code to Any framework. .NET Compact Framework .NET Framework Mono Project Unknown Supported operating systems. If you add anything here, make sure to add the appropriate detection code to Any operating system. Unix/Linux operating systems Windows CE Desktop versions of Windows (95,98,ME) Windows NT, 2000, 2003 and future versions based on NT technology Unknown operating system Provides simple programmatic configuration API used for trivial logging cases. Configures NLog for console logging so that all messages above and including the level are output to the console. Configures NLog for console logging so that all messages above and including the specified level are output to the console. The minimal logging level. 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. 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. Configures NLog for file logging so that all messages above and including the level are written to the specified file. Log file name. 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. Marks classes and properties as supporting particular runtime framework and operating system. Creates a new instance of . Marks classes and properties as supporting particular runtime framework and operating system. Creates a new instance of . Supported runtime framework. Supported operating system. Minimum runtime version supported. Maximum runtime version supported. Minimum operating system version supported. Maximum operating system version supported. A class for configuring NLog through an XML configuration file (App.config style or App.nlog style) Constructs a new instance of class and reads the configuration from the specified config file. Configuration file to be read. Constructs a new instance of class and reads the configuration from the specified config file. Configuration file to be read. Ignore any errors during configuration. Constructs a new instance of class and reads the configuration from the specified XML element. containing the configuration section. Name of the file that contains the element (to be used as a base for including other files). Constructs a new instance of class and reads the configuration from the specified XML element. containing the configuration section. Name of the file that contains the element (to be used as a base for including other files). Ignore any errors during configuration. Gets or sets the value indicating whether 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 null. Gets the default object by parsing the application configuration file (app.exe.config). Re-reads the original configuration file and returns the new object. The new object. Matches when the specified condition is met. Conditions are expressed using a simple language described here. Initializes a new instance of the filter object. The condition expression. 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
A base class for filters that are based on comparing a value to a layout. Initializes a new instance of . The layout text; Compiled layout. Determines whether stack trace information should be gathered during log event processing. By default it calls on . 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Matches when the calculated layout contains the specified substring. This filter is deprecated in favour of <when /> which is based on contitions Initializes a new instance of the filter object. Ignore case when comparing strings. Substring to be matched. 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
Matches when the calculated layout is equal to the specified substring. This filter is deprecated in favour of <when /> which is based on contitions Initializes a new instance of the filter object. Ignore case when comparing strings. String to compare the layout to. 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
Matches when the calculated layout does NOT contain the specified substring. This filter is deprecated in favour of <when /> which is based on contitions Initializes a new instance of the filter object. Substring to be matched. Ignore case when comparing strings. 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
Matches when the calculated layout is NOT equal to the specified substring. This filter is deprecated in favour of <when /> which is based on contitions Initializes a new instance of the filter object. String to compare the layout to. Ignore case when comparing strings. 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
Interface that provides parameters for create file function. Provides a multiprocess-safe atomic file appends while keeping the files open. On Unix you can get all the appends to be atomic, even when multiple processes are trying to write to the same file, because setting the file pointer to the end of the file and appending can be made one operation. On Win32 we need to maintain some synchronization between processes (global named mutex is used for this) Provides a multiprocess-safe atomic file appends while keeping the files open. On Unix you can get all the appends to be atomic, even when multiple processes are trying to write to the same file, because setting the file pointer to the end of the file and appending can be made one operation. A base class for all network senders. Supports one-way sending of messages over various protocols. Creates a new instance of the and initializes it with the specified URL. URL. The address of the network endpoint. Disposes the object. Creates a new instance of the network sender based on a network URL: URL that determines the network sender to be created. A newly created network sender. If the url starts with tcp:// - a new is created.
If the url starts with udp:// - a new is created.
Closes the sender and releases any unmanaged resources. Flushes any buffers. Send the given text over the specified protocol. Bytes to be sent. Offset in buffer Number of bytes to send Actually sends the given text over the specified protocol. The bytes to be sent. Offset in buffer Number of bytes to send To be overridden in inheriting classes. Closes the sender and releases any unmanaged resources. Sends messages over a TCP network connection. Creates a new instance of and initializes it with the specified URL. Connects to the server specified in the URL. URL. Must start with tcp:// Sends the specified text over the connected socket. The bytes to be sent. Offset in buffer Number of bytes to send To be overridden in inheriting classes. Closes the socket. Sends messages over the network as UDP datagrams. Creates a new instance of and initializes it with the specified URL. URL. Must start with udp:// Sends the specified text as a UDP datagram. The bytes to be sent. Offset in buffer Number of bytes to send To be overridden in inheriting classes. Closes the socket. Win32 file attributes For more information see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp. Read-only Hidden System File should be archived. Device Normal File is temporary (should be kept in cache and not written to disk if possible) Sparse file. Reparse point. Compress file contents. File should not be indexed by the content indexing service. Encrypt file. The system writes through any intermediate cache and goes directly to disk. The system opens a file with no system caching Delete file after it is closed. A file is accessed according to POSIX rules. A class that loads and manages NLog extension assemblies. Gets the list of loaded NLog extension assemblies. An containing all NLog extension assemblies that have been loaded. A dictionary with keys of type string and values of type Filter Initializes a new empty instance of the FilterDictionary class Gets or sets the Filter associated with the given string The string whose value to get or set. Gets a collection containing the keys in this FilterDictionary. Gets a collection containing the values in this FilterDictionary. Adds an element with the specified key and value to this FilterDictionary. The string key of the element to add. The Filter value of the element to add. Determines whether this FilterDictionary contains a specific key. The string key to locate in this FilterDictionary. true if this FilterDictionary contains an element with the specified key; otherwise, false. Determines whether this FilterDictionary contains a specific key. The string key to locate in this FilterDictionary. true if this FilterDictionary contains an element with the specified key; otherwise, false. Determines whether this FilterDictionary contains a specific value. The Filter value to locate in this FilterDictionary. true if this FilterDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this FilterDictionary. The string key of the element to remove. NLog internal logger Internal log level. Log internal messages to the console. Log internal messages to the console error stream. The name of the internal log file. value disables internal logging to a file. Returns true when internal log level includes Trace messages Returns true when internal log level includes Debug messages Returns true when internal log level includes Info messages Returns true when internal log level includes Warn messages Returns true when internal log level includes Error messages Returns true when internal log level includes Fatal messages Logs the specified message at the specified level. Log level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the specified level. Log level. Message which may include positional parameters. Arguments. Logs the specified message at the specified level. Log level. Log message. Logs the specified message at the Trace level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the Trace level. Message which may include positional parameters. Arguments. Logs the specified message at the Trace level. Log message. Logs the specified message at the Debug level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the Debug level. Message which may include positional parameters. Arguments. Logs the specified message at the Debug level. Log message. Logs the specified message at the Info level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the Info level. Message which may include positional parameters. Arguments. Logs the specified message at the Info level. Log message. Logs the specified message at the Warn level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the Warn level. Message which may include positional parameters. Arguments. Logs the specified message at the Warn level. Log message. Logs the specified message at the Error level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the Error level. Message which may include positional parameters. Arguments. Logs the specified message at the Error level. Log message. Logs the specified message at the Fatal level. Format provider to be used for formatting. Message which may include positional parameters. Arguments. Logs the specified message at the Fatal level. Message which may include positional parameters. Arguments. Logs the specified message at the Fatal level. Log message. A dictionary with keys of type string and values of type LayoutRenderer Initializes a new empty instance of the LayoutRendererDictionary class Gets or sets the LayoutRenderer associated with the given string The string whose value to get or set. Gets a collection containing the keys in this LayoutRendererDictionary. Gets a collection containing the values in this LayoutRendererDictionary. Adds an element with the specified key and value to this LayoutRendererDictionary. The string key of the element to add. The LayoutRenderer value of the element to add. Determines whether this LayoutRendererDictionary contains a specific key. The string key to locate in this LayoutRendererDictionary. true if this LayoutRendererDictionary contains an element with the specified key; otherwise, false. Determines whether this LayoutRendererDictionary contains a specific key. The string key to locate in this LayoutRendererDictionary. true if this LayoutRendererDictionary contains an element with the specified key; otherwise, false. Determines whether this LayoutRendererDictionary contains a specific value. The LayoutRenderer value to locate in this LayoutRendererDictionary. true if this LayoutRendererDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this LayoutRendererDictionary. The string key of the element to remove. A cyclic buffer of object. Creates a new instance of , sets the buffer size and grow options. Buffer size. Whether buffer should grow as it becomes full. The maximum number of items that the buffer can grow to. Gets the number of items in the array. 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. An array of objects that have been accumulated in the buffer. In case there are no items in the buffer, the function returns an empty array. A dictionary with keys of type string and values of type Logger Initializes a new empty instance of the LoggerDictionary class Gets or sets the Logger associated with the given string The string whose value to get or set. Gets a collection containing the keys in this LoggerDictionary. Gets a collection containing the values in this LoggerDictionary. Adds an element with the specified key and value to this LoggerDictionary. The string key of the element to add. The Logger value of the element to add. Determines whether this LoggerDictionary contains a specific key. The string key to locate in this LoggerDictionary. true if this LoggerDictionary contains an element with the specified key; otherwise, false. Determines whether this LoggerDictionary contains a specific key. The string key to locate in this LoggerDictionary. true if this LoggerDictionary contains an element with the specified key; otherwise, false. Determines whether this LoggerDictionary contains a specific value. The Logger value to locate in this LoggerDictionary. true if this LoggerDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this LoggerDictionary. The string key of the element to remove. A dictionary with keys of type string and values of type MethodInfo Initializes a new empty instance of the MethodInfoDictionary class Gets or sets the MethodInfo associated with the given string The string whose value to get or set. Gets a collection containing the keys in this MethodInfoDictionary. Gets a collection containing the values in this MethodInfoDictionary. Adds an element with the specified key and value to this MethodInfoDictionary. The string key of the element to add. The MethodInfo value of the element to add. Determines whether this MethodInfoDictionary contains a specific key. The string key to locate in this MethodInfoDictionary. true if this MethodInfoDictionary contains an element with the specified key; otherwise, false. Determines whether this MethodInfoDictionary contains a specific key. The string key to locate in this MethodInfoDictionary. true if this MethodInfoDictionary contains an element with the specified key; otherwise, false. Determines whether this MethodInfoDictionary contains a specific value. The MethodInfo value to locate in this MethodInfoDictionary. true if this MethodInfoDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this MethodInfoDictionary. The string key of the element to remove. A dictionary with keys of type string and values of type PropertyInfo Initializes a new empty instance of the PropertyInfoDictionary class Gets or sets the PropertyInfo associated with the given string The string whose value to get or set. Gets a collection containing the keys in this PropertyInfoDictionary. Gets a collection containing the values in this PropertyInfoDictionary. Adds an element with the specified key and value to this PropertyInfoDictionary. The string key of the element to add. The PropertyInfo value of the element to add. Determines whether this PropertyInfoDictionary contains a specific key. The string key to locate in this PropertyInfoDictionary. true if this PropertyInfoDictionary contains an element with the specified key; otherwise, false. Determines whether this PropertyInfoDictionary contains a specific key. The string key to locate in this PropertyInfoDictionary. true if this PropertyInfoDictionary contains an element with the specified key; otherwise, false. Determines whether this PropertyInfoDictionary contains a specific value. The PropertyInfo value to locate in this PropertyInfoDictionary. true if this PropertyInfoDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this PropertyInfoDictionary. The string key of the element to remove. A dictionary with keys of type string and values of type Target Initializes a new empty instance of the TargetDictionary class Gets or sets the Target associated with the given string The string whose value to get or set. Gets a collection containing the keys in this TargetDictionary. Gets a collection containing the values in this TargetDictionary. Adds an element with the specified key and value to this TargetDictionary. The string key of the element to add. The Target value of the element to add. Determines whether this TargetDictionary contains a specific key. The string key to locate in this TargetDictionary. true if this TargetDictionary contains an element with the specified key; otherwise, false. Determines whether this TargetDictionary contains a specific key. The string key to locate in this TargetDictionary. true if this TargetDictionary contains an element with the specified key; otherwise, false. Determines whether this TargetDictionary contains a specific value. The Target value to locate in this TargetDictionary. true if this TargetDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this TargetDictionary. The string key of the element to remove. Returns details about current process and thread in a portable manner. Singleton instance. Returns current unmanaged thread ID. Returns current thread ID. Returns current process ID. Returns current process name. Returns current process name (excluding filename extension, if any). Returns the base directory where process EXE file resides. A dictionary with keys of type string and values of type Type Initializes a new empty instance of the TypeDictionary class Gets or sets the Type associated with the given string The string whose value to get or set. Gets a collection containing the keys in this TypeDictionary. Gets a collection containing the values in this TypeDictionary. Adds an element with the specified key and value to this TypeDictionary. The string key of the element to add. The Type value of the element to add. Determines whether this TypeDictionary contains a specific key. The string key to locate in this TypeDictionary. true if this TypeDictionary contains an element with the specified key; otherwise, false. Determines whether this TypeDictionary contains a specific key. The string key to locate in this TypeDictionary. true if this TypeDictionary contains an element with the specified key; otherwise, false. Determines whether this TypeDictionary contains a specific value. The Type value to locate in this TypeDictionary. true if this TypeDictionary contains an element with the specified value; otherwise, false. Removes the element with the specified key from this TypeDictionary. The string key of the element to remove. A dictionary with keys of type Type and values of type PropertyInfoDictionary Initializes a new empty instance of the TypeToPropertyInfoDictionaryAssociation class Gets or sets the PropertyInfoDictionary associated with the given Type The Type whose value to get or set. Gets a collection containing the keys in this TypeToPropertyInfoDictionaryAssociation. Gets a collection containing the values in this TypeToPropertyInfoDictionaryAssociation. Adds an element with the specified key and value to this TypeToPropertyInfoDictionaryAssociation. The Type key of the element to add. The PropertyInfoDictionary value of the element to add. Determines whether this TypeToPropertyInfoDictionaryAssociation contains a specific key. The Type key to locate in this TypeToPropertyInfoDictionaryAssociation. true if this TypeToPropertyInfoDictionaryAssociation contains an element with the specified key; otherwise, false. Determines whether this TypeToPropertyInfoDictionaryAssociation contains a specific key. The Type key to locate in this TypeToPropertyInfoDictionaryAssociation. true if this TypeToPropertyInfoDictionaryAssociation contains an element with the specified key; otherwise, false. Determines whether this TypeToPropertyInfoDictionaryAssociation contains a specific value. The PropertyInfoDictionary value to locate in this TypeToPropertyInfoDictionaryAssociation. true if this TypeToPropertyInfoDictionaryAssociation contains an element with the specified value; otherwise, false. Removes the element with the specified key from this TypeToPropertyInfoDictionaryAssociation. The Type key of the element to remove. ASP.NET Application variable. Use this layout renderer to insert the value of the specified variable stored in the ASP.NET Application dictionary. You can set the value of an ASP.NET Application variable by using the following code: Example usage of ${aspnet-application}: ${aspnet-application:variable=myvariable} - produces "123" ${aspnet-application:variable=anothervariable} - produces "01/01/2006 00:00:00" ${aspnet-application:variable=anothervariable:culture=pl-PL} - produces "2006-01-01 00:00:00" ${aspnet-application:variable=myvariable:padding=5} - produces " 123" ${aspnet-application:variable=myvariable:padding=-5} - produces "123 " ${aspnet-application:variable=stringvariable:upperCase=true} - produces "AAA BBB" The variable name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified ASP.NET Application variable and appends it to the specified . The to append the rendered data to. Logging event. ASP.NET Request variable Use this layout renderer to insert the value of the specified parameter of the ASP.NET Request object. Example usage of ${aspnet-request}: ${aspnet-request:item=v} ${aspnet-request:querystring=v} ${aspnet-request:form=v} ${aspnet-request:cookie=v} ${aspnet-request:serverVariable=v} The item name. The QueryString, Form, Cookies, or ServerVariables collection variables having the specified name are rendered. The QueryString variable to be rendered. The form variable to be rendered. The cookie to be rendered. The ServerVariables item to be rendered. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified ASP.NET Request variable and appends it to the specified . The to append the rendered data to. Logging event. ASP.NET Session variable. Use this layout renderer to insert the value of the specified variable stored in the ASP.NET Session dictionary. You can set the value of an ASP.NET Session variable by using the following code: Example usage of ${aspnet-session}: ${aspnet-session:variable=myvariable} - produces "123" ${aspnet-session:variable=anothervariable} - produces "01/01/2006 00:00:00" ${aspnet-session:variable=anothervariable:culture=pl-PL} - produces "2006-01-01 00:00:00" ${aspnet-session:variable=myvariable:padding=5} - produces " 123" ${aspnet-session:variable=myvariable:padding=-5} - produces "123 " ${aspnet-session:variable=stringvariable:upperCase=true} - produces "AAA BBB" Session variable name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified ASP.NET Session value and appends it to the specified . The to append the rendered data to. Logging event. ASP.NET Session ID. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the ASP.NET Session ID appends it to the specified . The to append the rendered data to. Logging event. ASP.NET User variable Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified ASP.NET User.Identity.AuthenticationType variable and appends it to the specified . The to append the rendered data to. Logging event. ASP.NET User variable Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified ASP.NET User.Identity.Name variable and appends it to the specified . The to append the rendered data to. Logging event. The current application domain's base directory. Creates a new instance of . The name of the file to be Path.Combine()'d with with the base directory. The name of the directory to be Path.Combine()'d with with the base directory. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the application base directory and appends it to the specified . The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. The call site (class name, method name and source information) Render the class name. Render the method name. Render the source file name and line number. Include source file path. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Checks whether the stack trace is requested. 2 when the source file information is requested, 1 otherwise. Renders the call site and appends it to the specified . The to append the rendered data to. Logging event. A counter value (increases on each layout rendering). The initial value of the counter The value to be added to the counter after each layout rendering. The name of the sequence. Different named sequences can have individual values. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified counter value and appends it to the specified . The to append the rendered data to. Logging event. A date and time in the specified format. The date format. Can be any argument accepted by DateTime.ToString(format) Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current date and appends it to the specified . The to append the rendered data to. Logging event. The environment variable. Name of the environment variable. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified environment variable and appends it to the specified . The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. Log event context data Name of the item. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified log event context item and appends it to the specified . The to append the rendered data to. Logging event. Exception information provided through a call to one of the Logger.*Exception() methods. Initializes a new instance of . 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. The separator used to concatenate parts specified in the Format. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified exception information and appends it to the specified . The to append the rendered data to. Logging event. Contents of the specified file. Name of the file. File encoding. The encoding. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the contents of the specified file and appends it to the specified . The to append the rendered data to. Logging event. Global Diagnostics Context item. Provided for compatibility with log4net. Name of the item. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified Global Diagnostics Context item and appends it to the specified . The to append the rendered data to. Logging event. Globally-unique identifier (GUID). The GUID format as accepted by Guid.ToString() method. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders a newly generated GUID string and appends it to the specified . The to append the rendered data to. Logging event. Thread identity information (name and authentication information) The separator to be used when concatenating parts of identity information. Render Thread.CurrentPrincipal.Identity.Name. Render Thread.CurrentPrincipal.Identity.AuthenticationType. Render Thread.CurrentPrincipal.Identity.IsAuthenticated. When true the output of this renderer is modified so it can be used as a part of file path (illegal characters are replaced with '_') Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified identity information and appends it to the specified . The to append the rendered data to. Logging event. The log level. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current log level and appends it to the specified . The to append the rendered data to. Logging event. A string literal. This is used to escape '${' sequence as ;${literal:text=${}' Creates a new instance of . Initializes a new instance of the and sets the literal text value. The literal text value. This is used by the layout compiler. Literal text. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified string literal and appends it to the specified . The to append the rendered data to. Logging event. XML event description compatible with log4j, Chainsaw and NLogViewer Creates a new instance of and initializes default values. Include NLog-specific extensions to log4j schema. Whether the XML should use spaces for indentation. The AppInfo field. By default it's the friendly name of the current AppDomain. Include call site (class and method name) in the information sent over the network. Include source info (file name and line number) in the information sent over the network. Include MDC dictionary in the information sent over the network. Include NDC stack. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the XML logging event and appends it to the specified . The to append the rendered data to. Logging event. The logger name. Render short logger name (the part after the trailing dot character). Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the logger name and appends it to the specified . The to append the rendered data to. Logging event. The date and time in a long, sortable format yyyy-MM-dd HH:mm:ss.mmm Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the date in the long format (yyyy-MM-dd HH:mm:ss.mmm) and appends it to the specified . The to append the rendered data to. Logging event. The machine name that the process is running on. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the machine name and appends it to the specified . The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. Mapped Diagnostic Context item. Provided for compatibility with log4net. Name of the item. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified MDC item and appends it to the specified . The to append the rendered data to. Logging event. The formatted log message. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the log message including any positional parameters and appends it to the specified . The to append the rendered data to. Logging event. Nested Diagnostic Context item. Provided for compatibility with log4net. The number of top stack frames to be rendered. The number of bottom stack frames to be rendered. The separator to be used for concatenating NDC output. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified NDC item and appends it to the specified . The to append the rendered data to. Logging event. A newline literal. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the specified string literal and appends it to the specified . The to append the rendered data to. Logging event. The directory where NLog.dll is located. The name of the file to be Path.Combine()'d with the directory name. The name of the directory to be Path.Combine()'d with the directory name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the directory where NLog is located and appends it to the specified . The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. The performance counter. Name of the counter category. Name of the performance counter. Name of the performance counter instance (e.g. _Global_). Name of the machine to read the performance counter from. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Closes currently open performance counter (if any). Renders the specified environment variable and appends it to the specified . The to append the rendered data to. Logging event. The identifier of the current process. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current process ID. The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. The name of the current process. Write the full path to the process executable. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current process name (optionally with a full path). The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. The process time in format HH:mm:ss.mmm Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current process running time and appends it to the specified . The to append the rendered data to. Logging event. High precision timer, based on the value returned from QueryPerformanceCounter() optionally converted to seconds. Normalize the result by subtracting it from the result of the first call (so that it's effectively zero-based). Output the difference between the result of QueryPerformanceCounter and the previous one. Convert the result to seconds by dividing by the result of QueryPerformanceFrequency(). Number of decimal digits to be included in output. Align decimal point (emit non-significant zeros) Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the ticks value of current time and appends it to the specified . The to append the rendered data to. Logging event. Decodes text "encrypted" with ROT-13. See http://en.wikipedia.org/wiki/ROT13. The text to be decoded. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the inner message, decrypts it with ROT-13 and appends it to the specified . The to append the rendered data to. Logging event. Determines whether stack trace information should be gathered during log event processing. By default it calls on . 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Encodes/Decodes ROT-13-encoded string. The string to be encoded/decoded Encoded/Decoded text The short date in a sortable format yyyy-MM-dd Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current short date string (yyyy-MM-dd) and appends it to the specified . The to append the rendered data to. Logging event. System special folder path (includes My Documents, My Music, Program Files, Desktop, and more) System special folder. Full list of options is available at MSDN. The most common ones are:
  • ApplicationData - roaming application data for current user.
  • CommonApplicationData - application data for all users.
  • MyDocuments - My Documents
  • DesktopDirectory - Desktop directory
  • LocalApplicationData - non roaming application data
  • Personal - user profile directory
  • System - System directory
The name of the file to be Path.Combine()'d with the directory name. The name of the directory to be Path.Combine()'d with the directory name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the directory where NLog is located and appends it to the specified . The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. 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. The output format of the stack trace. The number of top stack frames to be rendered. Stack frame separator string. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Checks whether the stack trace is requested. 2 when the source file information is requested, 1 otherwise. Renders the call site and appends it to the specified . The to append the rendered data to. Logging event. A temporary directory. The name of the file to be Path.Combine()'d with the directory name. The name of the directory to be Path.Combine()'d with the directory name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the directory where NLog is located and appends it to the specified . The to append the rendered data to. Logging event. Determines whether the value produced by the layout renderer is fixed per current app-domain. The identifier of the current thread. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current thread identifier and appends it to the specified . The to append the rendered data to. Logging event. The name of the current thread. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current thread name and appends it to the specified . The to append the rendered data to. Logging event. The Ticks value of current date and time. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the ticks value of current time and appends it to the specified . The to append the rendered data to. Logging event. A column in the CSV Constructs a new instance of . Constructs a new instance of and initializes Name and Layout properties. The name of the column. The layout that should be written in the column. The compiled layout that should be written in the column. A collection of elements of type CsvFileColumn Initializes a new empty instance of the CsvFileColumnCollection class. Initializes a new instance of the CsvFileColumnCollection class, containing elements copied from an array. The array whose elements are to be added to the new CsvFileColumnCollection. Initializes a new instance of the CsvFileColumnCollection class, containing elements copied from another instance of CsvFileColumnCollection The CsvFileColumnCollection whose elements are to be added to the new CsvFileColumnCollection. Type-specific enumeration class, used by CsvFileColumnCollection.GetEnumerator. Gets or sets the CsvFileColumn at the given index in this CsvFileColumnCollection. Adds the elements of an array to the end of this CsvFileColumnCollection. The array whose elements are to be added to the end of this CsvFileColumnCollection. Adds the elements of another CsvFileColumnCollection to the end of this CsvFileColumnCollection. The CsvFileColumnCollection whose elements are to be added to the end of this CsvFileColumnCollection. Adds an instance of type CsvFileColumn to the end of this CsvFileColumnCollection. The CsvFileColumn to be added to the end of this CsvFileColumnCollection. Determines whether a specfic CsvFileColumn value is in this CsvFileColumnCollection. The CsvFileColumn value to locate in this CsvFileColumnCollection. true if value is found in this CsvFileColumnCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this CsvFileColumnCollection The CsvFileColumn value to locate in the CsvFileColumnCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the CsvFileColumnCollection at the specified index The index at which the CsvFileColumn is to be inserted. The CsvFileColumn to insert. Removes the first occurrence of a specific CsvFileColumn from this CsvFileColumnCollection. The CsvFileColumn value to remove from this CsvFileColumnCollection. Returns an enumerator that can iterate through the elements of this CsvFileColumnCollection. An object that implements System.Collections.IEnumerator. A specialized layout that renders CSV-formatted events. Initializes a new instance of the class. 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 CustomDelimiter Initializes a new instance of the class. The parent. Renders the layout for the specified logging event by invoking layout renderers. The logging event. The rendered layout. Returns the value indicating whether a stack trace and/or the source file information should be gathered during layout processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the value indicating whether this layout includes any volatile layout renderers. when the layout includes at least one volatile renderer, otherwise. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Precalculates the layout for the specified log event and stores the result in per-log event cache. The log event. Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer. Initializes the layout. Closes the layout. Add this layout and all sub-layouts to the specified collection.. The collection of layouts. Array of parameters to be passed. Whether CVS should include header. true if CVS should include header; otherwise, false. Column delimiter. Quoting mode. Quote Character Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom') Main layout (can be repeated multiple times) Header Footer CSV has no footer. Formats the log event for write. The log event to be formatted. A string representation of the log event. Initializes the layout. Returns the value indicating whether a stack trace and/or the source file information should be gathered during layout processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the value indicating whether this layout includes any volatile layout renderers. when the layout includes at least one volatile renderer, otherwise. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Precalculates the layout for the specified log event and stores the result in per-log event cache. The log event. Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer. Closes the layout. Gets the header. The log event to be formatted. A string representation of the log event. Add this layout and all sub-layouts to the specified collection.. The collection of layouts. Specifies allowes CSV quoting modes. Quote all column. Quote nothing. Quote only whose values contain the quote symbol or the separator. A specialized layout that supports header and footer. Initializes a new instance of the class. Main layout (can be repeated multiple times) Header Footer Renders the layout for the specified logging event by invoking layout renderers. The logging event. The rendered layout. Returns the value indicating whether a stack trace and/or the source file information should be gathered during layout processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the value indicating whether this layout includes any volatile layout renderers. when the layout includes at least one volatile renderer, otherwise. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Precalculates the layout for the specified log event and stores the result in per-log event cache. The log event. Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer. Initializes the layout. Closes the layout. Add this layout and all sub-layouts to the specified collection.. The collection of layouts. A specialized layout that renders Log4j-compatible XML events. Returns the instance that renders log events. Renders the layout for the specified logging event by invoking layout renderers. The logging event. The rendered layout. Returns the value indicating whether a stack trace and/or the source file information should be gathered during layout processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the value indicating whether this layout includes any volatile layout renderers. when the layout includes at least one volatile renderer, otherwise. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Precalculates the layout for the specified log event and stores the result in per-log event cache. The log event. Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer. Initializes the layout. Closes the layout. Add this layout and all sub-layouts to the specified collection.. The collection of layouts. A base class for targets which wrap other (multiple) targets and provide various forms of target routing. Creates a new instance of . Creates a new instance of and initializes the collection to the provided list of objects. A collection of targets managed by this compound target. Adds all layouts used by this target and sub-targets. The collection to add layouts to. Initializes the target by initializing all sub-targets. Closes the target by closing all sub-targets. A compound target that provides fallback-on-error functionality.

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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of and sets the targets to be used. Whether to return to the first target after any successful write. Forwards the log event to the sub-targets until one of them succeeds. The log event. The method remembers the last-known-successful target and starts the iteration from it. If is set, the method resets the target to the first target stored in . A compound target writes to a randomly-chosen target among the sub-targets.

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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates an instance of . Creates an instance of and initializes the collection with the specified list of objects. Forwards the log event to one of the sub-targets. The sub-target is randomly chosen. The log event. A compound target that forwards writes to the sub-targets in a round-robin fashion.

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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of and initializes the collection to the provided array of objects. 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]. A compound target that writes logging events to all attached sub-targets.

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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of and initializes the collection to the provided array of objects. Forwards the specified log event to all sub-targets. The log event. A target that buffers log events for the duration of the ASP.NET Request and sends them down to the wrapped target as soon as the request ends.

Typically this target is used in cooperation with PostFilteringTargetWrapper to provide verbose logging for failing requests and normal or no logging for successful requests. We need to make the decision of the final filtering rule to apply after all logs for a page have been generated.

To use this target, you need to add an entry in the httpModules section of web.config:

]]>

To set up the ASP.NET Buffering target wrapper configuration file, put the following in web.nlog file in your web application directory (this assumes that PostFilteringWrapper is used to provide the filtering and actual logs go to a file).

This assumes just one target and a single rule. More configuration options are described here.

To configure the target programmatically, put the following piece of code in your Application_OnStart() handler in Global.asax.cs or some other place that gets executed at the very beginning of your code:

Fully working C# project can be found in the Examples/Targets/Configuration API/ASPNetBufferingWrapper directory along with usage instructions.

Creates a new instance of the and initializes to 100. Creates a new instance of the , initializes to 100 and sets the to the specified value. Creates a new instance of the , initializes and the to the specified values. The number of log events to be buffered. Grow the buffer when it gets full. true causes the buffer to expand until is hit, false causes the buffer to never expand and lose the earliest entries in case of overflow. The maximum number of log events that the buffer can keep. Initializes the target by hooking up the NLogHttpModule BeginRequest and EndRequest events. Adds the specified log event to the buffer. The log event. Closes the target by flushing pending events in the buffer (if any). 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. A target wrapper that provides asynchronous, buffered execution of target writes.

Asynchronous target wrapper allows the logger code to execute more quickly, by queueing 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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of which wraps the specified target. The target to be wrapped. Creates a new instance of which wraps the specified target. The target to be wrapped. Maximum number of requests in the queue. The action to be taken when the queue overflows. Asynchronous request queue Creates a new instance of and sets the request limit and overflow action. Request limit. The overflow action. The request limit. Action to be taken when there's no more room in the queue and another request is enqueued. Number of requests currently in the queue. Number of requests currently being processed (in the queue + batched) Enqueues another item. If the queue is overflown the appropriate action is taken as specified by . The item to be queued. Dequeues a maximum of count items from the queue and adds returns the containing them. Maximum number of items to be dequeued. Notifies the queue that the request batch has been processed. The batch. Clears the queue. The number of log events that should be processed in a batch by the lazy writer thread. The time in milliseconds to sleep between batches. The queue of lazy writer thread requests. The action to be taken when the lazy writer thread request queue count exceeds the set limit. The limit on the number of requests in the lazy writer thread request queue. Initializes the target by starting the lazy writer thread. Closes the target by stopping 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. Starts the lazy writer thread which periodically writes queued log messages. Starts the lazy writer thread. Waits for the lazy writer thread to finish writing messages. A target wrapper that causes a flush after each write on a wrapped target.

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

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of and initializes the to the specified value. Forwards the call to the .Write() and calls on it. A target that buffers log events and sends them in batches to the wrapped target.

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

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of the and initializes to 100. Creates a new instance of the , initializes to 100 and sets the to the specified value. Creates a new instance of the , initializes and the to the specified values. Creates a new instance of the , initializes , and to the specified values. Number of log events to be buffered. Flush the contents of buffer if there's no write in the specified period of time (milliseconds). Use -1 to disable timed flushes. Initializes the target. Adds the specified log event to the buffer and flushes the buffer in case the buffer gets full. The log event. Flushes pending events in the buffer (if any). Closes the target by flushing pending events in the buffer (if any). Filtering rule for . Creates a new instance of . Condition to be tested. Resulting filter to be applied when the condition matches. Parsed Filter condition. Parsed Exists condition. A collection of elements of type FilteringRule Initializes a new empty instance of the FilteringRuleCollection class. Initializes a new instance of the FilteringRuleCollection class, containing elements copied from an array. The array whose elements are to be added to the new FilteringRuleCollection. Initializes a new instance of the FilteringRuleCollection class, containing elements copied from another instance of FilteringRuleCollection The FilteringRuleCollection whose elements are to be added to the new FilteringRuleCollection. Type-specific enumeration class, used by FilteringRuleCollection.GetEnumerator. Gets or sets the FilteringRule at the given index in this FilteringRuleCollection. Adds the elements of an array to the end of this FilteringRuleCollection. The array whose elements are to be added to the end of this FilteringRuleCollection. Adds the elements of another FilteringRuleCollection to the end of this FilteringRuleCollection. The FilteringRuleCollection whose elements are to be added to the end of this FilteringRuleCollection. Adds an instance of type FilteringRule to the end of this FilteringRuleCollection. The FilteringRule to be added to the end of this FilteringRuleCollection. Determines whether a specfic FilteringRule value is in this FilteringRuleCollection. The FilteringRule value to locate in this FilteringRuleCollection. true if value is found in this FilteringRuleCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this FilteringRuleCollection The FilteringRule value to locate in the FilteringRuleCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the FilteringRuleCollection at the specified index The index at which the FilteringRule is to be inserted. The FilteringRule to insert. Removes the first occurrence of a specific FilteringRule from this FilteringRuleCollection. The FilteringRule value to remove from this FilteringRuleCollection. Returns an enumerator that can iterate through the elements of this FilteringRuleCollection. An object that implements System.Collections.IEnumerator. A target wrapper that filters log entries based on a condition.

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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of and initializes the and properties. Condition expression. Log events who meet this condition will be forwarded to the wrapped target. Checks the condition against the passed log event. If the condition is met, the log event is forwarded to the wrapped target. Log event. Adds all layouts used by this target to the specified collection. The collection to add layouts to. A target wrapper that impersonates another user for the duration of the write. Creates a new instance of . Creates a new instance of and initializes the to the specified value. Impersonation level. Anonymous Identification Impersonation Delegation Logon type. Interactive Logon This logon type is intended for users who will be interactively using the computer, such as a user being logged on by a terminal server, remote shell, or similar process. This logon type has the additional expense of caching logon information for disconnected operations; therefore, it is inappropriate for some client/server applications, such as a mail server. Network Logon This logon type is intended for high performance servers to authenticate plaintext passwords. The LogonUser function does not cache credentials for this logon type. Batch Logon This logon type is intended for batch servers, where processes may be executing on behalf of a user without their direct intervention. This type is also for higher performance servers that process many plaintext authentication attempts at a time, such as mail or Web servers. The LogonUser function does not cache credentials for this logon type. Logon as a Service Indicates a service-type logon. The account provided must have the service privilege enabled. Network Clear Text Logon This logon type preserves the name and password in the authentication package, which allows the server to make connections to other network servers while impersonating the client. A server can accept plaintext credentials from a client, call LogonUser, verify that the user can access the system across the network, and still communicate with other servers. NOTE: Windows NT: This value is not supported. New Network Credentials This logon type allows the caller to clone its current token and specify new credentials for outbound connections. The new logon session has the same local identifier but uses different credentials for other network connections. NOTE: This logon type is supported only by the LOGON32_PROVIDER_WINNT50 logon provider. NOTE: Windows NT: This value is not supported. Logon provider. Use the standard logon provider for the system. The default security provider is negotiate, unless you pass NULL for the domain name and the user name is not in UPN format. In this case, the default provider is NTLM. NOTE: Windows 2000/NT: The default security provider is NTLM. Username to change context to Password Windows domain name to change context to. Logon Type. Logon Provider. Impersonation level. Revert to the credentials of the process instead of impersonating another user. Changes the security context, forwards the call to the .Write() and switches the context back to original. The log event. Changes the security context, forwards the call to the .Write() and switches the context back to original. Log events. Initializes the impersonation context. Closes the impersonation context. A target wrapper that filters buffered log entries based on a set of conditions that are evaluated on all events. PostFilteringWrapper must be used with some type of buffering target or wrapper, such as AsyncTargetWrapper, BufferingWrapper or ASPNetBufferingWrapper.

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). You can plug in a different type of buffering wrapper (such as ASPNetBufferingWrapper) to achieve different functionality.

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

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Default filter to be applied when no specific rule matches. 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. Processes a single log event. Not very useful for this post-filtering wrapper. Log event. Adds all layouts used by this target to the specified collection. The collection to add layouts to. A target wrapper that repeats each log event the specified number of times.

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

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

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of , initializes the to the specified value and sets the , The number of times to repeat each log message. Forwards the log message to the by calling the method times. The log event. Forwards the array of log events to the by calling the method times. The array of log events. A target wrapper that causes retries on wrapped target errors.

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:

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

Creates a new instance of . Creates a new instance of and initializes the and properties. Number of retries that should be attempted on the wrapped target in case of a failure. The time to wait between retries in milliseconds. Writes the specified log event to the wrapped target, retrying and pausing in case of an error. The log event. Base class for targets wrap other (single) targets. The target that this target wraps. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Closes the target by forwarding the call to the object. Forwards the call to .NeedsStackTrace(). The value of forwarded call Initializes the target by forwarding the call to to the . Returns the text representation of the object. Used for diagnostics. A string that describes the target. Writes logging messages to the ASP.NET trace.

To set up the ASP.NET Trace target in the configuration file, put the following in web.nlog file in your web application directory.

This assumes just one target and a single rule. More configuration options are described here.

To configure the target programmatically, put the following piece of code in your Application_OnStart() handler in Global.asax.cs or some other place that gets executed at the very beginning of your code:

Fully working C# project can be found in the Examples/Targets/Configuration API/ASPNetTrace directory along with usage instructions.

Resulting log entries can be viewed by navigating to http://server/path/Trace.axd.
HTTP Request List:

HTTP Request Details:

Writes the specified logging event to the ASP.NET Trace facility. Log entries can then be viewed by navigating to http://server/path/Trace.axd If the log level is greater than or equal to it uses the method, otherwise it uses method. The logging event.
Sends logging messages to the remote instance of Chainsaw application from log4j.

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

This assumes just one target and a single rule. More configuration options are described here.

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

NOTE: If your receiver application is ever likely to be off-line, don't use TCP protocol or you'll get TCP timeouts and your application will crawl. Either switch to UDP transport or use AsyncWrapper target so that your application threads will not be blocked by the timing-out connection attempts.

Creates a new instance of the and initializes default property values. Writes logging messages to the console.

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

This assumes just one target and a single rule. More configuration options are described here.

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

Send the logging messages to the standard error instead of the standard output. Writes the specified logging event to the Console.Out or Console.Error depending on the value of the Error flag. The logging event. Note that the Error option is not supported on .NET Compact Framework. Initializes the target. Closes the target and releases any unmanaged resources. Writes logging messages to the database using an ADO.NET provider. The configuration is dependent on the database type, because there are differnet methods of specifying connection string, SQL command and command parameters. MS SQL Server using System.Data.SqlClient: Oracle using System.Data.OracleClient: Oracle using System.Data.OleDbClient: To set up the log target programmatically use code like this (an equivalent of MSSQL configuration): Creates a new instance of the object and sets the default values of some properties; The name of the database provider. It can be: sqlserver, mssql, microsoft, msde (all for MSSQL database), oledb, odbc or other name in which case it's treated as a fully qualified type name of the data provider *Connection class. The connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. Keep the database connection open between the log events. Use database transactions. Some data providers require this. The database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. The database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. The database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. The database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. The database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. The database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. The database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. The database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. The text of the SQL command to be run on each log level. Typically this is a SQL INSERT statement or a stored procedure call. It should use the database-specific parameters (marked as @parameter for SQL server or :parameter for Oracle, other data providers have their own notation) and not the layout renderers, because the latter is prone to SQL injection attacks. The layout renderers should be specified as <parameters />> instead. The text of the SQL command to be run on each log level. Typically this is a SQL INSERT statement or a stored procedure call. It should use the database-specific parameters (marked as @parameter for SQL server or :parameter for Oracle, other data providers have their own notation) and not the layout renderers, because the latter is prone to SQL injection attacks. The layout renderers should be specified as <parameters />< instead. The collection of paramters. Each parameter contains a mapping between NLog layout and a database named or positional parameter. Writes the specified logging event to the database. It creates a new database command, prepares parameters for it by calculating layouts and executes the command. The logging event. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Represents a parameter to a Database target. Creates a new instance of . Creates a new instance of and sets Name and Layout properties to the specified values. Database parameter name. The layout that should be use to calcuate the value for the parameter. The compiled representation of the Layout property. Database parameter size. Database parameter precision. Database parameter scale. A collection of elements of type DatabaseParameterInfo Initializes a new empty instance of the DatabaseParameterInfoCollection class. Initializes a new instance of the DatabaseParameterInfoCollection class, containing elements copied from an array. The array whose elements are to be added to the new DatabaseParameterInfoCollection. Initializes a new instance of the DatabaseParameterInfoCollection class, containing elements copied from another instance of DatabaseParameterInfoCollection The DatabaseParameterInfoCollection whose elements are to be added to the new DatabaseParameterInfoCollection. Type-specific enumeration class, used by DatabaseParameterInfoCollection.GetEnumerator. Gets or sets the DatabaseParameterInfo at the given index in this DatabaseParameterInfoCollection. Adds the elements of an array to the end of this DatabaseParameterInfoCollection. The array whose elements are to be added to the end of this DatabaseParameterInfoCollection. Adds the elements of another DatabaseParameterInfoCollection to the end of this DatabaseParameterInfoCollection. The DatabaseParameterInfoCollection whose elements are to be added to the end of this DatabaseParameterInfoCollection. Adds an instance of type DatabaseParameterInfo to the end of this DatabaseParameterInfoCollection. The DatabaseParameterInfo to be added to the end of this DatabaseParameterInfoCollection. Determines whether a specfic DatabaseParameterInfo value is in this DatabaseParameterInfoCollection. The DatabaseParameterInfo value to locate in this DatabaseParameterInfoCollection. true if value is found in this DatabaseParameterInfoCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this DatabaseParameterInfoCollection The DatabaseParameterInfo value to locate in the DatabaseParameterInfoCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the DatabaseParameterInfoCollection at the specified index The index at which the DatabaseParameterInfo is to be inserted. The DatabaseParameterInfo to insert. Removes the first occurrence of a specific DatabaseParameterInfo from this DatabaseParameterInfoCollection. The DatabaseParameterInfo value to remove from this DatabaseParameterInfoCollection. Returns an enumerator that can iterate through the elements of this DatabaseParameterInfoCollection. An object that implements System.Collections.IEnumerator. Counts logging messages but does not output them anywhere. Provides the counter of logged messages and remembers the latest one.

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

This assumes just one target and a single rule. More configuration options are described here.

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

The number of times this target has been called. The last message rendered by this target. Increases the number of messages. The logging event. Writes logging messages to the attached managed debugger (for example Visual Studio .NET or DbgCLR).

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

This assumes just one target and a single rule. More configuration options are described here.

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

Writes the specified logging event to the attached debugger. The logging event. Initializes the target. Closes the target and releases any unmanaged resources. Writes logging messages to one or more files.

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

You can use a single target to write to multiple files. The following example writes each log message to a file named after its log level, so it will create: Trace.log, Debug.log, Info.log, Warn.log, Error.log, Fatal.log

The file names can be quite complex for the most demanding scenarios. This example shows a way to create separate files for each day, user and log level. As you can see, the possibilities are endless.

Depending on your usage scenario it may be useful to add an asynchronous target wrapper around the file target. This way all your log messages will be written in a separate thread so your main thread can finish your work more quickly. Asynchronous logging is recommended for multi-threaded server applications which run for a long time and is not recommended for quickly-finishing command line applications.

The above examples assume just one target and a single rule. See below for a programmatic configuration that's equivalent to the above config file:

More configuration options are described here.

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

File target can also do file archiving, meaning that the log file is automatically moved to another place based on its size and time. This example demonstrates file archiving based on size. Files after 10000 bytes are moved to a separate folder and renamed log.00000.txt, log.00001.txt and so on.

File archiving can also be done on date/time changes. For example, to create a new archive file every minute use this code:

You can combine both methods as demonstrated here:

Note that file archiving works even when you use a single target instance to write to multiple files, such as putting each log level in a separate place:

You can write texts using alternative layouts, such as CSV (comma-separated values). This example writes files which are properly CSV-quoted (can handle messages with line breaks and quotes)

This is the configuration file version:
Creates a new instance of . Specifies the way archive numbering is performed. Sequence style numbering. The most recent archive has the highest number. Rolling style numbering (the most recent is always #0 then #1, ..., #N Modes of archiving files based on time. Don't archive based on time. Archive every year. Archive every month. Archive daily. Archive every hour. Archive every minute. Line ending mode. Insert platform-dependent end-of-line 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. Don't insert any line ending. The name of the file to write to. This FileName string is a layout which may include instances of layout renderers. This lets you use a single target to 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. Create directories if they don't exist. Setting this to false may improve performance a bit, but you'll receive an error when attempting to write to a directory that's not present. The number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). The files are managed on a LRU (least recently used) basis, which flushes the files that have not been used for the longest period of time should the cache become full. As a rule of thumb, you shouldn't set this parameter to a very high value. A number like 10-15 shouldn't be exceeded, because you'd be keeping a large number of files open which consumes system resources. Maximum number of seconds that files are kept open. If this number is negative. Delete old log file on startup. This option works only when the "fileName" parameter denotes a single file. Replace file contents on each write instead of appending log message at the end. Keep log file open instead of opening and closing it on each logging event. Setting this property to True helps improve performance. Enable log file(s) to be deleted. File attributes (Windows only). Gets the characters that are appended after each line. Line ending mode. Automatically flush the file buffers after each log message. Log file buffer size in bytes. File encoding. Can be any encoding name supported by System.Text.Encoding.GetEncoding() e.g. windows-1252, iso-8859-2. Enables concurrent writes to the log file by multiple processes on the same host. This makes multi-process logging possible. NLog uses a special technique that lets it keep the files open for writing. Disables open-fi The number of times the write is appended on the file before NLog discards the log message. Automatically archive log files that exceed the specified size in bytes. Caution: Enabling this option can considerably slow down your file logging in multi-process scenarios. If only one process is going to be writing to the file, consider setting ConcurrentWrites to false for maximum performance. Automatically archive log files every time the specified time passes. Possible options are: year, month, day, hour, minute. Files are moved to the archive as part of the write operation if the current period of time changes. For example if the current hour changes from 10 to 11, the first write that will occur on or after 11:00 will trigger the archiving.

Caution: Enabling this option can considerably slow down your file logging in multi-process scenarios. If only one process is going to be writing to the file, consider setting ConcurrentWrites to false for maximum performance.

The name of the file to be used for an archive. It may contain a special placeholder {#####} that will be replaced with a sequence of numbers depending on the archiving strategy. The number of hash characters used determines the number of numerical digits to be used for numbering files. The delay in milliseconds to wait before attempting to write to the file again. The actual delay is a random value between 0 and the value specified in this parameter. On each failed attempt the delay base is doubled up to times. Assuming that ConcurrentWriteAttemptDelay is 10 the time to wait will be:

a random value between 0 and 10 milliseconds - 1st attempt
a random value between 0 and 20 milliseconds - 2nd attempt
a random value between 0 and 40 milliseconds - 3rd attempt
a random value between 0 and 80 milliseconds - 4th attempt
...

and so on.

Maximum number of archive files that should be kept.
Determines the way file archives are numbered. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Formats the log event for write. The log event to be formatted. A string representation of the log event. Gets the bytes to be written to the file. log event array of bytes that are ready to be written Writes the specified logging event to a file specified in the FileName parameter. The logging event. Writes the specified array of logging events to a file specified in the FileName parameter. An array of objects. This function makes use of the fact that the events are batched by sorting the requests by filename. This optimizes the number of open/close calls and can help improve performance. Initializes file logging by creating data structures that enable efficient multi-file logging. Modifies the specified byte array before it gets sent to a file. The byte array The modified byte array. The function can do the modification in-place. Removes records of initialized files that have not been accessed in the last two days. Files are marked 'initialized' for the purpose of writing footers when the logging finishes. Removes records of initialized files that have not been accessed after the specified date. Files are marked 'initialized' for the purpose of writing footers when the logging finishes. Flushes all pending file operations. The timeout The timeout parameter is ignored, because file APIs don't provide the needed functionality. Closes the file(s) opened for writing. Sends logging messages by email using SMTP protocol.

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

This assumes just one target and a single rule. More configuration options are described here.

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

Mail target works best when used with BufferingWrapper target which lets you send multiple logging messages in single mail

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

To set up the buffered mail target programmatically use code like this:

Creates a new instance of . SMTP authentication modes. No authentication. Basic - username and password NTLM Authentication Sender's email address (e.g. joe@domain.com) Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com) CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com) BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com) Whether to add new lines between log entries. true if new lines should be added; otherwise, false. Mail subject. Mail message body (repeated for each log message send in one mail) Encoding to be used for sending e-mail. Send message as HTML instead of plain text. SMTP Server to be used for sending. SMTP Authentication mode. The username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). The password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). The port that SMTP Server is listening on. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Renders the logging event message and adds it to the internal ArrayList of log messages. The logging event. Renders an array logging events. Array of logging events. Writes logging messages to an ArrayList in memory for programmatic retrieval.

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

This assumes just one target and a single rule. More configuration options are described here.

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

Returns the list of logs gathered in the . Renders the logging event message and adds it to the internal ArrayList of log messages. The logging event. Pops up logging messages as message boxes.

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

This assumes just one target and a single rule. More configuration options are described here.

The result is a message box:

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

Creates a new instance of the . Message box title. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Displays the message box with the log message and caption specified in the Caption parameter. The logging event. Displays the message box with the array of rendered logs messages and caption specified in the Caption parameter. The array of logging events. Calls the specified static method on each logging message and passes contextual parameters to it.

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

This assumes just one target and a single rule. More configuration options are described here.

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

The class name. The method name. The method must be public and static. Calls the specified Method. Method parameters. A parameter to MethodCall. Constructs a new instance of and sets the type to String. Constructs a new instance of , sets the type to String and initializes the Layout property. Constructs a new instance of , sets the type to String and initializes the Name and Layout properties. Constructs a new instance of , sets the type to String and initializes the Name, Layout and Type properties. The name of the parameter. The type of the parameter. The layout that should be use to calcuate the value for the parameter. The compiled layout that should be use to calcuate the value for the parameter. A collection of elements of type MethodCallParameter Initializes a new empty instance of the MethodCallParameterCollection class. Initializes a new instance of the MethodCallParameterCollection class, containing elements copied from an array. The array whose elements are to be added to the new MethodCallParameterCollection. Initializes a new instance of the MethodCallParameterCollection class, containing elements copied from another instance of MethodCallParameterCollection The MethodCallParameterCollection whose elements are to be added to the new MethodCallParameterCollection. Type-specific enumeration class, used by MethodCallParameterCollection.GetEnumerator. Gets or sets the MethodCallParameter at the given index in this MethodCallParameterCollection. Adds the elements of an array to the end of this MethodCallParameterCollection. The array whose elements are to be added to the end of this MethodCallParameterCollection. Adds the elements of another MethodCallParameterCollection to the end of this MethodCallParameterCollection. The MethodCallParameterCollection whose elements are to be added to the end of this MethodCallParameterCollection. Adds an instance of type MethodCallParameter to the end of this MethodCallParameterCollection. The MethodCallParameter to be added to the end of this MethodCallParameterCollection. Determines whether a specfic MethodCallParameter value is in this MethodCallParameterCollection. The MethodCallParameter value to locate in this MethodCallParameterCollection. true if value is found in this MethodCallParameterCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this MethodCallParameterCollection The MethodCallParameter value to locate in the MethodCallParameterCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the MethodCallParameterCollection at the specified index The index at which the MethodCallParameter is to be inserted. The MethodCallParameter to insert. Removes the first occurrence of a specific MethodCallParameter from this MethodCallParameterCollection. The MethodCallParameter value to remove from this MethodCallParameterCollection. Returns an enumerator that can iterate through the elements of this MethodCallParameterCollection. An object that implements System.Collections.IEnumerator. The base class for all targets which call methods (local or remote). Manages parameters and type coercion. 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 method. Must be implemented in concrete classes. Method call parameters Adds all layouts used by this target to the specified collection. The collection to add layouts to. Sends logging messages over the network.

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

This assumes just one target and a single rule. More configuration options are described here.

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

To print the results, use any application that's able to receive messages over TCP or UDP. NetCat is a simple but very powerful command-line tool that can be used for that. This image demonstrates the NetCat tool receiving log messages from Network target.

NOTE: If your receiver application is ever likely to be off-line, don't use TCP protocol or you'll get TCP timeouts and your application will crawl. Either switch to UDP transport or use AsyncWrapper target so that your application threads will not be blocked by the timing-out connection attempts.

There are two specialized versions of the Network target: Chainsaw and NLogViewer which write to instances of Chainsaw log4j viewer or NLogViewer application respectively.

Action that should be taken if the message overflows. Report an error. Split the message into smaller pieces. Discard the entire message The network address. Can be tcp://host:port or udp://host:port For HTTP Support use the WebService target. The network address. Can be tcp://host:port, udp://host:port, http://host:port or https://host:port Keep connection open whenever possible. Append newline at the end of log message. Maximum message size in bytes. Action that should be taken if the message is larger than maxMessageSize Encoding Can be any encoding name supported by System.Text.Encoding.GetEncoding() e.g. windows-1252, iso-8859-2. Sends the provided text to the specified address. The address. Can be tcp://host:port, udp://host:port, http://host:port The bytes to be sent. Flushes any buffers. Flush timeout. Closes the target. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Sends the rendered logging event over the network optionally concatenating it with a newline character. The logging event. Gets the bytes to be written. Log event Byte array. Sends logging messages to the remote instance of NLog Viewer.

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

This assumes just one target and a single rule. More configuration options are described here.

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

NOTE: If your receiver application is ever likely to be off-line, don't use TCP protocol or you'll get TCP timeouts and your application will crawl. Either switch to UDP transport or use AsyncWrapper target so that your application threads will not be blocked by the timing-out connection attempts.

Creates a new instance of the and initializes default property values. An instance of that is used to format log messages. Include NLog-specific extensions to log4j schema. The AppInfo field. By default it's the friendly name of the current AppDomain. Include call site (class and method name) in the information sent over the network. Include source info (file name and line number) in the information sent over the network. Include MDC dictionary in the information sent over the network. Include NDC stack. The collection of parameters. Each parameter contains a mapping between NLog layout and a named parameter. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Returns the value indicating whether call site and/or source information should be gathered. 2 - when IncludeSourceInfo is set, 1 when IncludeCallSite is set, 0 otherwise Represents a parameter to a NLogViewer target. ba Creates a new instance of . Viewer parameter name. The layout that should be use to calcuate the value for the parameter. The compiled representation of the Layout property. A collection of elements of type NLogViewerParameterInfo Initializes a new empty instance of the NLogViewerParameterInfoCollection class. Initializes a new instance of the NLogViewerParameterInfoCollection class, containing elements copied from an array. The array whose elements are to be added to the new NLogViewerParameterInfoCollection. Initializes a new instance of the NLogViewerParameterInfoCollection class, containing elements copied from another instance of NLogViewerParameterInfoCollection The NLogViewerParameterInfoCollection whose elements are to be added to the new NLogViewerParameterInfoCollection. Type-specific enumeration class, used by NLogViewerParameterInfoCollection.GetEnumerator. Gets or sets the NLogViewerParameterInfo at the given index in this NLogViewerParameterInfoCollection. Adds the elements of an array to the end of this NLogViewerParameterInfoCollection. The array whose elements are to be added to the end of this NLogViewerParameterInfoCollection. Adds the elements of another NLogViewerParameterInfoCollection to the end of this NLogViewerParameterInfoCollection. The NLogViewerParameterInfoCollection whose elements are to be added to the end of this NLogViewerParameterInfoCollection. Adds an instance of type NLogViewerParameterInfo to the end of this NLogViewerParameterInfoCollection. The NLogViewerParameterInfo to be added to the end of this NLogViewerParameterInfoCollection. Determines whether a specfic NLogViewerParameterInfo value is in this NLogViewerParameterInfoCollection. The NLogViewerParameterInfo value to locate in this NLogViewerParameterInfoCollection. true if value is found in this NLogViewerParameterInfoCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this NLogViewerParameterInfoCollection The NLogViewerParameterInfo value to locate in the NLogViewerParameterInfoCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the NLogViewerParameterInfoCollection at the specified index The index at which the NLogViewerParameterInfo is to be inserted. The NLogViewerParameterInfo to insert. Removes the first occurrence of a specific NLogViewerParameterInfo from this NLogViewerParameterInfoCollection. The NLogViewerParameterInfo value to remove from this NLogViewerParameterInfoCollection. Returns an enumerator that can iterate through the elements of this NLogViewerParameterInfoCollection. An object that implements System.Collections.IEnumerator. Discards logging messages optionally forcing the layouts to be calculated. Used mainly for debugging and benchmarking.

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

This assumes just one target and a single rule. More configuration options are described here.

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

Perform layout calculation. Does nothing. Optionally it calculates the layout text but discards the results. The logging event. Sends logging messages through System.Diagnostics.Trace

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

This assumes just one target and a single rule. More configuration options are described here.

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

Writes the specified logging event to the facility. If the log level is greater than or equal to it uses the method, otherwise it uses method. The logging event. Calls the specified web service on each logging message. The web service must implement a method that accepts a number of string parameters.

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

This assumes just one target and a single rule. More configuration options are described here.

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

The example web service that works with this example is shown below

Web service protocol SOAP 1.1 SOAP 1.2 HTTP POST HTTP GET Web service URL. Web service method name. Web service namespace. The protocol to be used when calling web service. Invokes the web service method. Parameters to be passed. ASP.NET HttpModule that enables NLog to hook BeginRequest and EndRequest events easily. Event to be raised at the end of each HTTP Request. Event to be raised at the beginning of each HTTP Request. Initializes the HttpModule ASP.NET application Disposes the module. ASP Application variable. The variable name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. Because ASP target uses COM Interop which is quite expensive, this method always returns 64. Renders the specified ASP Application variable and appends it to the specified . The to append the rendered data to. Logging event. ASP Request variable The item name. The QueryString, Form, Cookies, or ServerVariables collection variables having the specified name are rendered. The QueryString variable to be rendered. The form variable to be rendered. The cookie to be rendered. The ServerVariables item to be rendered. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. Because ASP target uses COM Interop which is quite expensive, this method always returns 64. Renders the specified ASP Request variable and appends it to the specified . The to append the rendered data to. Logging event. ASP Session variable. Session variable name. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. Because ASP target uses COM Interop which is quite expensive, this method always returns 64. Renders the specified ASP Session variable and appends it to the specified . The to append the rendered data to. Logging event. A value from the Registry. Registry value. The value to be output when the specified registry key or value is not found. Registry key. Must have one of the forms:
  • HKLM\Key\Full\Name
  • HKEY_LOCAL_MACHINE\Key\Full\Name
  • HKCU\Key\Full\Name
  • HKEY_CURRENT_USER\Key\Full\Name
Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. This function always returns 32. Reads the specified registry key and value and appends it to the passed . The to append the rendered data to. Logging event. Ignored. Thread Windows identity information (username) Whether domain name should be included. Whether username should be included. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Renders the current thread windows identity information and appends it to the specified . The to append the rendered data to. Logging event. Outputs logging messages through the ASP Response object. Add <!-- --> comments around all written texts. Outputs the rendered logging event through the OutputDebugString() Win32 API. The logging event. Writes logging messages to the console with customizable coloring.

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

This assumes just one target and a single rule. More configuration options are described here.

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

The result is a colorful console, where each color represents a single log level.

In addition you can configure your own word highlighting rules so that particular words or regular expressions will be marked with a distinguished color:

Programmatic equivalent of the above configuration:

Here's the result:

Custom row highlighting lets you colorize the output by any condition. This example shows how to mark all entries containing the word "serious" with white color on red background and mark all entries coming from a particular logger with yellow on blue.

Programmatic equivalent of the above configuration:

Here's the result:

Determines whether the error stream (stderr) should be used instead of the output stream (stdout). Use default row highlighting rules. The default rules are:
ConditionForeground ColorBackground Color
level == LogLevel.FatalRedNoChange
level == LogLevel.ErrorYellowNoChange
level == LogLevel.WarnMagentaNoChange
level == LogLevel.InfoWhiteNoChange
level == LogLevel.DebugGrayNoChange
level == LogLevel.TraceDarkGrayNoChange
Row highlighting rules. Word highlighting rules. Writes the specified log event to the console highlighting entries and words based on a set of defined rules. Log event. Initializes the target. Closes the target and releases any unmanaged resources. Colored console output color. Note that this enumeration is defined to be binary compatible with .NET 2.0 System.ConsoleColor + some additions Black (#000000) Dark blue (#000080) Dark green (#008000) Dark Cyan (#008080) Dark Red (#800000) Dark Magenta (#800080) Dark Yellow (#808000) Gray (#C0C0C0) Dark Gray (#808080) Blue (#0000FF) Green (#00FF00) Cyan (#00FFFF) Red (#FF0000) Magenta (#FF00FF) Yellow (#FFFF00) White (#FFFFFF) Don't change the color. The row-highlighting condition. Creates a new instance of Creates a new instance of and assigns Condition, ForegroundColor and BackgroundColor properties. Default highlighting rule. Doesn't change the color. The condition that must be met in order to set the specified foreground and background color. The foreground color. The background color. Checks whether the specified log event matches the condition (if any) log event if the condition is not defined or if it matches, otherwise A collection of elements of type ConsoleRowHighlightingRule Initializes a new empty instance of the ConsoleRowHighlightingRuleCollection class. Initializes a new instance of the ConsoleRowHighlightingRuleCollection class, containing elements copied from an array. The array whose elements are to be added to the new ConsoleRowHighlightingRuleCollection. Initializes a new instance of the ConsoleRowHighlightingRuleCollection class, containing elements copied from another instance of ConsoleRowHighlightingRuleCollection The ConsoleRowHighlightingRuleCollection whose elements are to be added to the new ConsoleRowHighlightingRuleCollection. Type-specific enumeration class, used by ConsoleRowHighlightingRuleCollection.GetEnumerator. Gets or sets the ConsoleRowHighlightingRule at the given index in this ConsoleRowHighlightingRuleCollection. Adds the elements of an array to the end of this ConsoleRowHighlightingRuleCollection. The array whose elements are to be added to the end of this ConsoleRowHighlightingRuleCollection. Adds the elements of another ConsoleRowHighlightingRuleCollection to the end of this ConsoleRowHighlightingRuleCollection. The ConsoleRowHighlightingRuleCollection whose elements are to be added to the end of this ConsoleRowHighlightingRuleCollection. Adds an instance of type ConsoleRowHighlightingRule to the end of this ConsoleRowHighlightingRuleCollection. The ConsoleRowHighlightingRule to be added to the end of this ConsoleRowHighlightingRuleCollection. Determines whether a specfic ConsoleRowHighlightingRule value is in this ConsoleRowHighlightingRuleCollection. The ConsoleRowHighlightingRule value to locate in this ConsoleRowHighlightingRuleCollection. true if value is found in this ConsoleRowHighlightingRuleCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this ConsoleRowHighlightingRuleCollection The ConsoleRowHighlightingRule value to locate in the ConsoleRowHighlightingRuleCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the ConsoleRowHighlightingRuleCollection at the specified index The index at which the ConsoleRowHighlightingRule is to be inserted. The ConsoleRowHighlightingRule to insert. Removes the first occurrence of a specific ConsoleRowHighlightingRule from this ConsoleRowHighlightingRuleCollection. The ConsoleRowHighlightingRule value to remove from this ConsoleRowHighlightingRuleCollection. Returns an enumerator that can iterate through the elements of this ConsoleRowHighlightingRuleCollection. An object that implements System.Collections.IEnumerator. Highlighting rule for Win32 colorful console. Creates a new instance of Creates a new instance of and sets Text, BackgroundColor and ForegroundColor properties. The regular expression to be matched. You must specify either text or regex. The text to be matched. You must specify either text or regex. Match whole words only. Ignore case when comparing texts. Compiled regular expression that matches either Text or Regex property. The foreground color. The background color. A collection of elements of type ConsoleWordHighlightingRule Initializes a new empty instance of the ConsoleWordHighlightingRuleCollection class. Initializes a new instance of the ConsoleWordHighlightingRuleCollection class, containing elements copied from an array. The array whose elements are to be added to the new ConsoleWordHighlightingRuleCollection. Initializes a new instance of the ConsoleWordHighlightingRuleCollection class, containing elements copied from another instance of ConsoleWordHighlightingRuleCollection The ConsoleWordHighlightingRuleCollection whose elements are to be added to the new ConsoleWordHighlightingRuleCollection. Type-specific enumeration class, used by ConsoleWordHighlightingRuleCollection.GetEnumerator. Gets or sets the ConsoleWordHighlightingRule at the given index in this ConsoleWordHighlightingRuleCollection. Adds the elements of an array to the end of this ConsoleWordHighlightingRuleCollection. The array whose elements are to be added to the end of this ConsoleWordHighlightingRuleCollection. Adds the elements of another ConsoleWordHighlightingRuleCollection to the end of this ConsoleWordHighlightingRuleCollection. The ConsoleWordHighlightingRuleCollection whose elements are to be added to the end of this ConsoleWordHighlightingRuleCollection. Adds an instance of type ConsoleWordHighlightingRule to the end of this ConsoleWordHighlightingRuleCollection. The ConsoleWordHighlightingRule to be added to the end of this ConsoleWordHighlightingRuleCollection. Determines whether a specfic ConsoleWordHighlightingRule value is in this ConsoleWordHighlightingRuleCollection. The ConsoleWordHighlightingRule value to locate in this ConsoleWordHighlightingRuleCollection. true if value is found in this ConsoleWordHighlightingRuleCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this ConsoleWordHighlightingRuleCollection The ConsoleWordHighlightingRule value to locate in the ConsoleWordHighlightingRuleCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the ConsoleWordHighlightingRuleCollection at the specified index The index at which the ConsoleWordHighlightingRule is to be inserted. The ConsoleWordHighlightingRule to insert. Removes the first occurrence of a specific ConsoleWordHighlightingRule from this ConsoleWordHighlightingRuleCollection. The ConsoleWordHighlightingRule value to remove from this ConsoleWordHighlightingRuleCollection. Returns an enumerator that can iterate through the elements of this ConsoleWordHighlightingRuleCollection. An object that implements System.Collections.IEnumerator. Writes log message to the Event Log.

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

This assumes just one target and a single rule. More configuration options are described here.

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

Creates a new instance of and Machine name on which Event Log service is running. Layout that renders event ID. Layout that renders event Category. The value to be used as the event Source. By default this is the friendly name of the current AppDomain. Name of the Event Log to write to. This can be System, Application or any user-defined name. Writes the specified logging event to the event log. The logging event. Writes log message to the specified message queue handled by MSMQ.

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

You can use a single target to write to multiple queues (similar to writing to multiple files with the File target).

The above examples assume just one target and a single rule. More configuration options are described here.

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

Name of the queue to write to. To write to a private queue on a local machine use .\private$\QueueName. For other available queue names, consult MSMQ documentation. The label to associate with each message. By default no label is associated. Create the queue if it doesn't exists. Encoding to be used when writing text to the queue. Use the XML format when serializing message. Use recoverable messages (with guaranteed delivery). Adds all layouts used by this target to the specified collection. The collection to add layouts to. Writes the specified logging event to a queue specified in the Queue parameter. The logging event. Prepares a message to be sent to the message queue. The log event to be used when calculating label and text to be written. The message to be sent You may override this method in inheriting classes to provide services like encryption or message authentication. Outputs logging messages through the OutputDebugString() Win32 API.

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

This assumes just one target and a single rule. More configuration options are described here.

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

Outputs the rendered logging event through the OutputDebugString() Win32 API. The logging event. Stub for OutputDebugString native method the string to output Increments specified performance counter on each write.

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

This assumes just one target and a single rule. More configuration options are described here.

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

TODO: 1. Unable to create a category allowing multiple counter instances (.Net 2.0 API only, probably) 2. Is there any way of adding new counters without deleting the whole category? 3. There should be some mechanism of resetting the counter (e.g every day starts from 0), or auto-switching to another counter instance (with dynamic creation of new instance). This could be done with layouts.
Creates a new instance of . Whether performance counter should be automatically created. Performance counter category. Name of the performance counter. Instance name. Performance counter type. Increments the configured performance counter. log event Marks class as a log event Condition and assigns a name to it Creates a new instance of and assigns a name to it. The name of the condition method. A factory of condition methods. Retrieves condition MethodInfos based on their names. Removes all condition method information from the factory. Scans the specified assembly for types marked with and adds them to the factory. Optionally it prepends the specified text to layout renderer names to avoid naming collisions. The assembly to be scanned for layout renderers. The prefix to be prepended to layout renderer names. Registers the specified condition method under a specified name. Name of the condition method. of the method to be registered. Returns the for the specified condition method. Name of the condition method. object that represents the condition method. Marks the class as containing condition methods. Creates a new instance of . An abstract filter class. Provides a way to eliminate log messages based on properties other than logger name and log level. The value that should be returned when this filter matches. User-requested action to be taken when filter matches. Allowed values are log, ignore, neutral. 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
Determines whether stack trace information should be gathered during log event processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Marks class as a layout renderer and assigns a name to it Creates a new instance of and assigns a name to it. The name of the filter. A collection of elements of type Filter Initializes a new empty instance of the FilterCollection class. Initializes a new instance of the FilterCollection class, containing elements copied from an array. The array whose elements are to be added to the new FilterCollection. Initializes a new instance of the FilterCollection class, containing elements copied from another instance of FilterCollection The FilterCollection whose elements are to be added to the new FilterCollection. Type-specific enumeration class, used by FilterCollection.GetEnumerator. Gets or sets the Filter at the given index in this FilterCollection. Adds the elements of an array to the end of this FilterCollection. The array whose elements are to be added to the end of this FilterCollection. Adds the elements of another FilterCollection to the end of this FilterCollection. The FilterCollection whose elements are to be added to the end of this FilterCollection. Adds an instance of type Filter to the end of this FilterCollection. The Filter to be added to the end of this FilterCollection. Determines whether a specfic Filter value is in this FilterCollection. The Filter value to locate in this FilterCollection. true if value is found in this FilterCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this FilterCollection The Filter value to locate in the FilterCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the FilterCollection at the specified index The index at which the Filter is to be inserted. The Filter to insert. Removes the first occurrence of a specific Filter from this FilterCollection. The Filter value to remove from this FilterCollection. Returns an enumerator that can iterate through the elements of this FilterCollection. An object that implements System.Collections.IEnumerator. A factory of logging filters. Creates new filters based on their names. Collection of filter types added to the factory. Removes all filter information from the factory. Scans the specified assembly for types marked with and adds them to the factory. Optionally it prepends the specified text to filter names to avoid naming collisions. The assembly to be scanned for filters. The prefix to be prepended to filter names. Registers the specified filter type to the factory under a specified name. The name of the filter (e.g. whenEquals or whenContains) The type of the new filter The name specified in the name parameter can then be used to create filters. Creates the filter object based on its filter name. The name of the filter (e.g. whenEquals or whenNotEqual) A new instance of the object. 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. Global Diagnostics Context - a dictionary structure to hold per-application-instance values. Sets the Global Diagnostics Context item to the specified value. Item name. Item value. Gets the Global Diagnostics Context named item. Item name. The item value of String.Empty if the value is not present. Checks whether the specified item exists in the Global Diagnostics Context. Item name. A boolean indicating whether the specified item exists in current thread GDC. Removes the specified item from the Global Diagnostics Context. Item name. Clears the content of the GDC. Abstract interface that layouts must implement. Renders the layout for the specified logging event by invoking layout renderers. The logging event. The rendered layout. Returns the value indicating whether a stack trace and/or the source file information should be gathered during layout processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the value indicating whether this layout includes any volatile layout renderers. when the layout includes at least one volatile renderer, otherwise. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Precalculates the layout for the specified log event and stores the result in per-log event cache. The log event. Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer. Initializes the layout. Closes the layout. Add this layout and all sub-layouts to the specified collection.. The collection of layouts. Layout with header and footer. Main layout (can be repeated multiple times) Header Footer Represents a string with embedded placeholders that can render contextual information. Creates a new instance of the and sets it to empty string. Creates a new instance of the and sets it to the specified string. The layout string to parse. The layout text Returns true if this layout produces a value that doesn't change for a particular AppDomain. A collection of objects that make up this layout. Renders the layout for the specified logging event by invoking layout renderers that make up the event. The logging event. The rendered layout. Returns the value indicating whether a stack trace and/or the source file information should be gathered during layout processing. 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the value indicating whether this layout includes any volatile layout renderers. when the layout includes at least one volatile renderer, otherwise. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Precalculates the layout for the specified log event and stores the result in per-log event cache. The log event. Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer. 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 occurences of '${' with '${literal:text=${}' Evaluates the specified text by expadinging all layout renderers. The text to be evaluated. Log event to be used for evaluation The input text with all occurences of ${} replaced with values provided by the appropriate layout renderers. Evaluates the specified text by expadinging all layout renderers in new context. The text to be evaluated. The input text with all occurences of ${} replaced with values provided by the appropriate layout renderers. Initializes the layout. Closes the layout; Add this layout and all sub-layouts to the specified collection.. The collection of layouts. Returns a that represents the current . A that represents the current . Marks class as a layout renderer and assigns a format string to it. Creates a new instance of and assigns the to the specified value. layout name The layout name. A collection of elements of type ILayout Initializes a new empty instance of the LayoutCollection class. Initializes a new instance of the LayoutCollection class, containing elements copied from an array. The array whose elements are to be added to the new LayoutCollection. Initializes a new instance of the LayoutCollection class, containing elements copied from another instance of LayoutCollection The LayoutCollection whose elements are to be added to the new LayoutCollection. Type-specific enumeration class, used by LayoutCollection.GetEnumerator. Gets or sets the ILayout at the given index in this LayoutCollection. Adds the elements of an array to the end of this LayoutCollection. The array whose elements are to be added to the end of this LayoutCollection. Adds the elements of another LayoutCollection to the end of this LayoutCollection. The LayoutCollection whose elements are to be added to the end of this LayoutCollection. Adds an instance of type ILayout to the end of this LayoutCollection. The ILayout to be added to the end of this LayoutCollection. Determines whether a specfic ILayout value is in this LayoutCollection. The ILayout value to locate in this LayoutCollection. true if value is found in this LayoutCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this LayoutCollection The ILayout value to locate in the LayoutCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the LayoutCollection at the specified index The index at which the ILayout is to be inserted. The ILayout to insert. Removes the first occurrence of a specific ILayout from this LayoutCollection. The ILayout value to remove from this LayoutCollection. Returns an enumerator that can iterate through the elements of this LayoutCollection. An object that implements System.Collections.IEnumerator. A factory for layouts. Creates new layout instances based on their names. Collection of layout types added to the factory. Removes all layout information from the factory. Scans the specified assembly for types marked with and adds them to the factory. Optionally it prepends the specified text to layout names to avoid naming collisions. The assembly to be scanned for layouts. The prefix to be prepended to layout names. Registers the specified layout type to the factory under a specified name. The name of the layout (e.g. XML, CSV or HTML) The type of the new layout The name specified in the name parameter can then be used to reference layouts. Creates the layout renderer object based on its layout renderer name and sets its properties from parameters string. The name of the layout renderer (e.g. message or aspnet-request) A new instance of the object. Render environmental information related to logging events. Creates a new instance of Padding value. The absolute value of the property. The padding character. Trim the rendered text to the AbsolutePadding value. Render an upper-case string. Render an upper-case string. The culture name to be used for rendering. The format for culture names is described in RFC 1766 and at MSDN. Some examples of valid culture names are:
  • en-US - English (United States)
  • en-UK - English (United Kingdom)
  • pl-PL - Polish
  • ar-SA - Arabic (Saudi Arabia)
The to be used for rendering. Returns the estimated number of characters that are needed to hold the rendered value for the specified logging event. Logging event information. The number of characters. If the exact number is not known or expensive to calculate this function should return a rough estimate that's big enough in most cases, but not too big, in order to conserve memory. Determines whether stack trace information should be gathered during log event processing. By default it calls on . 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Determines whether the layout renderer is volatile. A boolean indicating whether the layout renderer is volatile. Volatile layout renderers are dependent on information not contained in (such as thread-specific data, MDC data, NDC data). Renders the specified environmental information and appends it to the specified . The to append the rendered data to. Logging event. Determines whether it's necessary to call . when there's any trimming, padding or case conversion necessary, otherwise Should this method return , it's necessary to call ApplyPadding on a rendered text, otherwise it's not necessary to do so. Post-processes the rendered message by applying padding, upper- and lower-case conversion. The text to be post-processed. Padded, trimmed, and case-converted string. Determines whether the value produced by the layout renderer is fixed per current app-domain. The boolean value. true makes the value of the layout renderer be precalculated and inserted as a literal in the resulting layout string. Initializes the layout renderer. Closes the layout renderer. Marks class as a layout renderer and assigns a format string to it. Creates a new instance of and assigns the to the specified value. The format string that can be used to invoke the layout renderer. Marks the specified layout renderer as ignoring padding (used mostly for documentation generation). Marks the specified layout renderer as relying purely on the contents of only and not on any other information (such as thread- A collection of elements of type LayoutRenderer Initializes a new empty instance of the LayoutRendererCollection class. Initializes a new instance of the LayoutRendererCollection class, containing elements copied from an array. The array whose elements are to be added to the new LayoutRendererCollection. Initializes a new instance of the LayoutRendererCollection class, containing elements copied from another instance of LayoutRendererCollection The LayoutRendererCollection whose elements are to be added to the new LayoutRendererCollection. Type-specific enumeration class, used by LayoutRendererCollection.GetEnumerator. Gets or sets the LayoutRenderer at the given index in this LayoutRendererCollection. Adds the elements of an array to the end of this LayoutRendererCollection. The array whose elements are to be added to the end of this LayoutRendererCollection. Adds the elements of another LayoutRendererCollection to the end of this LayoutRendererCollection. The LayoutRendererCollection whose elements are to be added to the end of this LayoutRendererCollection. Adds an instance of type LayoutRenderer to the end of this LayoutRendererCollection. The LayoutRenderer to be added to the end of this LayoutRendererCollection. Determines whether a specfic LayoutRenderer value is in this LayoutRendererCollection. The LayoutRenderer value to locate in this LayoutRendererCollection. true if value is found in this LayoutRendererCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this LayoutRendererCollection The LayoutRenderer value to locate in the LayoutRendererCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the LayoutRendererCollection at the specified index The index at which the LayoutRenderer is to be inserted. The LayoutRenderer to insert. Removes the first occurrence of a specific LayoutRenderer from this LayoutRendererCollection. The LayoutRenderer value to remove from this LayoutRendererCollection. Returns an enumerator that can iterate through the elements of this LayoutRendererCollection. An object that implements System.Collections.IEnumerator. A factory for layout renderers. Creates new layout renderers based on their names. Removes all layout renderer information from the factory. Scans the specified assembly for types marked with and adds them to the factory. Optionally it prepends the specified text to layout renderer names to avoid naming collisions. The assembly to be scanned for layout renderers. The prefix to be prepended to layout renderer names. Registers the specified layout renderer type to the factory under a specified name. The name of the layout renderer (e.g. logger, message or aspnet-request) The type of the new layout renderer The name specified in the name parameter can then be used to create layout renderers. Creates the layout renderer object based on its layout renderer name and sets its properties from parameters string. The name of the layout renderer (e.g. message or aspnet-request) Parameters to the layout renderer. A new instance of the object. Represents the logging event. Creates a new instance of . Creates a new instance of and assigns its fields. Log level Logger name Log message including parameter placeholders Creates a new instance of and assigns its fields. Log level Logger name object Log message including parameter placeholders Parameter array. Creates a new instance of and assigns its fields. Log level Logger name object Log message including parameter placeholders Parameter array. Exception information. The date of the first log event created. Gets or sets the timestamp of the logging event. Gets or sets the level of the logging event. Returns true if stack trace has been set for this event. 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 or sets the exception information. Gets or sets the logger name. Gets the logger short name. Gets the raw log message including any parameter placeholders. Gets the parameter values or if no parameters have been specified. Gets the format provider that was provided while logging or when no formatProvider was specified. Returns the formatted message. Gets the dictionary of per-event context properties. The unique identifier of log event which is automatically generated and monotonously increasing. Creates the null event. Creates and manages instances of objects. Creates a new instance of Creates a new instance of and sets the initial configuration. Occurs when logging changes. Occurs when logging gets reloaded. Specified whether NLog should throw exceptions. By default exceptions are not thrown under any circumstances. Gets or sets the current logging configuration. Global log threshold. Log events below this threshold are not logged. Creates a logger that discards all log messages. Gets the logger named after the currently-being-initialized class. The logger. This is a slow-running method. Make sure you're not doing this in a loop. Gets the logger named after the currently-being-initialized class. type of the logger to create. The type must inherit from NLog.Logger The logger. This is a slow-running method. Make sure you're not doing this in a loop. 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. Gets the specified named logger. name of the logger type of the logger to create. The type must inherit from NLog.Logger The logger reference. 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. Flush any pending log messages (in case of asynchronous targets). 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. Decreases the log enable counter and if it reaches -1 the logs are disabled. Logging is enabled if the number of calls is greater than or equal to calls. An object that iplements IDisposable whose Dispose() method reenables logging. To be used with C# using () statement. Increases the log enable counter and if it reaches 0 the logs are disabled. Logging is enabled if the number of calls is greater than or equal to calls. Returns if logging is currently enabled. if logging is currently enabled, otherwise. Logging is enabled if the number of calls is greater than or equal to calls. Specialized LogFactory that can return instances of custom logger types. The type of the logger to be returned. Must inherit from . Gets the logger. The name. An instance of . Gets the logger named after the currently-being-initialized class. The logger. This is a slow-running method. Make sure you're not doing this in a loop. Provides logging interface and utility functions. 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. Determines if logging is enabled for the Trace level. if logging is enabled for the Trace level, otherwise it returns . Determines if logging is enabled for the Debug level. if logging is enabled for the Debug level, otherwise it returns . Determines if logging is enabled for the Info level. if logging is enabled for the Info level, otherwise it returns . Determines if logging is enabled for the Warn level. if logging is enabled for the Warn level, otherwise it returns . Determines if logging is enabled for the Error level. if logging is enabled for the Error level, otherwise it returns . Determines if logging is enabled for the Fatal level. if logging is enabled for the Fatal level, otherwise it returns . Determines if logging is enabled for the specified level. level to be checked if logging is enabled for the specified level, otherwise it returns . Writes the diagnostic message at the specified level using the specified format provider and format parameters. Writes the specified diagnostic message. log event Writes the diagnostic message at the specified level using the specified format provider and format parameters. Writes the specified diagnostic message. log event The name of the type that wraps Logger Writes the diagnostic message at the specified level using the specified format provider and format parameters. 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. 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 and exception at the specified level. the log level. A to be written. 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 as a parameter. the log level. 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. A to be written. 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 and exception at the Trace level. A to be written. An exception to be logged. 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 using the specified parameters. A containing format items. Arguments 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. 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 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Trace level using the specified 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 as a parameter. A containing one format item. The 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. A to be written. 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 and exception at the Debug level. A to be written. An exception to be logged. 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 using the specified parameters. A containing format items. Arguments 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. 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 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Debug level using the specified 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 as a parameter. A containing one format item. The 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. A to be written. 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 and exception at the Info level. A to be written. An exception to be logged. 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 using the specified parameters. A containing format items. Arguments 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. 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 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Info level using the specified 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 as a parameter. A containing one format item. The 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. A to be written. 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 and exception at the Warn level. A to be written. An exception to be logged. 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 using the specified parameters. A containing format items. Arguments 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. 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 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Warn level using the specified 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 as a parameter. A containing one format item. The 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. A to be written. 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 and exception at the Error level. A to be written. An exception to be logged. 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 using the specified parameters. A containing format items. Arguments 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. 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 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Error level using the specified 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 as a parameter. A containing one format item. The 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. A to be written. 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 and exception at the Fatal level. A to be written. An exception to be logged. 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 using the specified parameters. A containing format items. Arguments 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. 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 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Writes the diagnostic message at the Fatal level using the specified 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 as a parameter. A containing one format item. The argument to format. Defines available log levels. The Trace level. The Debug level. The Info level. The Warn level. The Error level. The Fatal level. The Off level. Gets the name of the log level. Gets the name of the logger in upper case. Gets the name of the logger in lower case. 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 texual representation of the log level the enumeration value. Returns a string representation of the log level. Log level name. Compares the level to the other object. the object 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 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 l1.Ordinal <= l2.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 l1.Ordinal >= l2.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 l1.Ordinal < l2.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 l1.Ordinal > l2.Ordinal Creates and manages instances of objects. Occurs when logging changes. Occurs when logging gets reloaded. Specified whether NLog should throw exceptions. By default exceptions are not thrown under any circumstances. Gets or sets the current logging configuration. Global log threshold. Log events below this threshold are not logged. Gets the logger named after the currently-being-initialized class. The logger. This is a slow-running method. Make sure you're not doing this in a loop. Gets the logger named after the currently-being-initialized class. the logger class. The class must inherit from The logger. This is a slow-running method. Make sure you're not doing this in a loop. Creates a logger that 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. Gets the specified named logger. name of the logger the logger class. The class must inherit from The logger reference. 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. Flush any pending log messages (in case of asynchronous targets). 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. Decreases the log enable counter and if it reaches -1 the logs are disabled. Logging is enabled if the number of calls is greater than or equal to calls. An object that iplements IDisposable whose Dispose() method reenables logging. To be used with C# using () statement. Increases the log enable counter and if it reaches 0 the logs are disabled. Logging is enabled if the number of calls is greater than or equal to calls. Returns if logging is currently enabled. if logging is currently enabled, otherwise. Logging is enabled if the number of calls is greater than or equal to calls. Mapped Diagnostics Context - a thread-local structure that keeps a dictionary of strings and provides methods to output them in layouts. Mostly for compatibility with log4net. Sets the current thread MDC item to the specified value. Item name. Item value. Gets the current thread MDC named item. Item name. The item value of String.Empty if the value is not present. Checks whether the specified item exists in current thread MDC. Item name. A boolean indicating whether the specified item exists in current thread MDC. Removes the specified item from current thread MDC. Item name. Clears the content of current thread MDC. Nested Diagnostics Context - a thread-local structure that keeps a stack of strings and provides methods to output them in layouts Mostly for compatibility with log4net. 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. Pops the top message off the NDC stack. The top message which is no longer on the stack. Gets the top NDC message but doesn't remove it. The top message. Clears current thread NDC stack. Gets all messages on the stack separated by the specified separator. The separator. Messages on the stack concatenated using the specified separator. Calculates the string representing count bottommost messages using the specified separator. Number of bottom messages to be returned The separator A string representing count bottommost messages using the specified separator. Calculates the string representing count topmost messages using the specified separator. Number of topmost messages to be returned The separator A string representing count topmost messages using the specified separator. Represents logging target. Creates a new instance of the logging target and initializes default layout. The default value of the layout is: ${longdate}|${level:uppercase=true}|${logger}|${message} The name of the target. Gets the collection of objects that are used by this target. A object which is a typed collection of objects. The collection is cached and accumulated by calling . Invalidates the collection of layouts cached by . Writes logging event to the log target. Must be overridden in inheriting classes. Logging 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 "Append" method. Inheriting classes can use this method to optimize batch writes. Logging events to be written out. Determines whether stack trace information should be gathered during log event processing. By default it calls on the result of . 0 - don't include stack trace
1 - include stack trace without source file information
2 - include full stack trace
Returns the text representation of the object. Used for diagnostics. A string that describes the target. Flush any pending log messages (in case of asynchronous targets). 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. Closes the target and releases any unmanaged resources. Calls the on each volatile layout used by this target. The log event. A layout is volatile if it contains at least one for which returns true. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Initializes the target. Can be used by inheriting classes to initialize logging. Marks class as a logging target and assigns a name to it. Creates a new instance of the TargetAttribute class and sets the name. The name of the logging target. Determines whether the target ignores layout specification. Marks the target as 'wrapper' target (used to generate the target summary documentation page); Marks the target as 'compound' target (used to generate the target summary documentation page); A collection of elements of type Target Initializes a new empty instance of the TargetCollection class. Initializes a new instance of the TargetCollection class, containing elements copied from an array. The array whose elements are to be added to the new TargetCollection. Initializes a new instance of the TargetCollection class, containing elements copied from another instance of TargetCollection The TargetCollection whose elements are to be added to the new TargetCollection. Type-specific enumeration class, used by TargetCollection.GetEnumerator. Gets or sets the Target at the given index in this TargetCollection. Adds the elements of an array to the end of this TargetCollection. The array whose elements are to be added to the end of this TargetCollection. Adds the elements of another TargetCollection to the end of this TargetCollection. The TargetCollection whose elements are to be added to the end of this TargetCollection. Adds an instance of type Target to the end of this TargetCollection. The Target to be added to the end of this TargetCollection. Determines whether a specfic Target value is in this TargetCollection. The Target value to locate in this TargetCollection. true if value is found in this TargetCollection; false otherwise. Return the zero-based index of the first occurrence of a specific value in this TargetCollection The Target value to locate in the TargetCollection. The zero-based index of the first occurrence of the _ELEMENT value if found; -1 otherwise. Inserts an element into the TargetCollection at the specified index The index at which the Target is to be inserted. The Target to insert. Removes the first occurrence of a specific Target from this TargetCollection. The Target value to remove from this TargetCollection. Returns an enumerator that can iterate through the elements of this TargetCollection. An object that implements System.Collections.IEnumerator. A factory of logging targets. Creates new targets based on their names. Collection of target types added to the factory. Removes all target information from the factory. Removes all targets and reloads them from NLog assembly and default extension assemblies. Scans the specified assembly for types marked with and adds them to the factory. Optionally it prepends the specified text to the target names to avoid naming collisions. The assembly to be scanned for targets. The prefix to be prepended to target names. Adds default targets from the NLog.dll assembly. Registers the specified target type to the factory under a specified name. The name of the target (e.g. File or Console) The type of the new target The name specified in the targetName parameter can then be used to create target. Creates the target object based on its target name. The name of the target (e.g. File or Console) A new instance of the Target object. Represents target that supports string formatting using layouts. Creates a new instance of The text to be rendered. The compiled layout, can be an instance of or other layout type. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Initializes the target. Represents target that supports string formatting using layouts. Creates a new instance of The text to be rendered. Header Footer Compiled header. The compiled header. The header can be of any layout type. Compiled footer. The compiled footer. The header can be of any layout type. Gets the compiled layout with header and footer. The compiled layout with header and footer. Adds all layouts used by this target to the specified collection. The collection to add layouts to. Initializes the target. Represents a method that's invoked each time a logging configuration changes. Represents a method that's invoked each time a logging configuration gets reloaded to signal either success or failure. Represents a method that's invoked each time a configuration changes. logger that was reconfigured 'Reconfiguring' a logger means rebuilding the list of targets and filters that will be invoked on logging. This may or may not influence the result returned by IsXXXXEnabled properties.