Click or drag to resize

InternalLogger Class

NLog internal logger. Writes to file, console or custom text writer (see LogWriter)
Inheritance Hierarchy
SystemObject
  NLog.CommonInternalLogger

Namespace:  NLog.Common
Assembly:  NLog (in NLog.dll) Version: 5.0.1+a3718b8417284a90b0f73b2cbba47bc4067f6a3a
Syntax
public static class InternalLogger

The InternalLogger type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberIncludeTimestamp
Gets or sets a value indicating whether timestamp should be included in internal log output.
Public propertyStatic memberIsDebugEnabled
Gets a value indicating whether internal log includes Debug messages.
Public propertyStatic memberIsErrorEnabled
Gets a value indicating whether internal log includes Error messages.
Public propertyStatic memberIsFatalEnabled
Gets a value indicating whether internal log includes Fatal messages.
Public propertyStatic memberIsInfoEnabled
Gets a value indicating whether internal log includes Info messages.
Public propertyStatic memberIsTraceEnabled
Gets a value indicating whether internal log includes Trace messages.
Public propertyStatic memberIsWarnEnabled
Gets a value indicating whether internal log includes Warn messages.
Public propertyStatic memberLogFile
Gets or sets the file path of the internal log file.
Public propertyStatic memberCode exampleLogLevel
Gets or sets the minimal internal log level.
Public propertyStatic memberLogToConsole
Gets or sets a value indicating whether internal messages should be written to the console output stream.
Public propertyStatic memberLogToConsoleError
Gets or sets a value indicating whether internal messages should be written to the console error stream.
Public propertyStatic memberLogToTrace
Gets or sets a value indicating whether internal messages should be written to the System.Diagnostics.Trace
Public propertyStatic memberLogWriter
Gets or sets the text writer that will receive internal logs.
Top
Methods
  NameDescription
Public methodStatic memberDebug(FuncString)
Logs the specified message without an Exception at the Debug level. messageFunc will be only called when logging is enabled for level Debug.
Public methodStatic memberDebug(String)
Logs the specified message without an Exception at the Debug level.
Public methodStatic memberDebug(Exception, FuncString)
Logs the specified message with an Exception at the Debug level. messageFunc will be only called when logging is enabled for level Debug.
Public methodStatic memberDebug(Exception, String)
Logs the specified message with an Exception at the Debug level.
Public methodStatic memberDebug(String, Object)
Logs the specified message without an Exception at the Debug level.
Public methodStatic memberDebug(Exception, String, Object)
Logs the specified message with an Exception at the Debug level.
Public methodStatic memberDebugTArgument1(String, TArgument1)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberDebugTArgument1, TArgument2(String, TArgument1, TArgument2)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberDebugTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberError(FuncString)
Logs the specified message without an Exception at the Error level. messageFunc will be only called when logging is enabled for level Error.
Public methodStatic memberError(String)
Logs the specified message without an Exception at the Error level.
Public methodStatic memberError(Exception, FuncString)
Logs the specified message with an Exception at the Error level. messageFunc will be only called when logging is enabled for level Error.
Public methodStatic memberError(Exception, String)
Logs the specified message with an Exception at the Error level.
Public methodStatic memberError(String, Object)
Logs the specified message without an Exception at the Error level.
Public methodStatic memberError(Exception, String, Object)
Logs the specified message with an Exception at the Error level.
Public methodStatic memberErrorTArgument1(String, TArgument1)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberErrorTArgument1, TArgument2(String, TArgument1, TArgument2)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberErrorTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberFatal(FuncString)
Logs the specified message without an Exception at the Fatal level. messageFunc will be only called when logging is enabled for level Fatal.
Public methodStatic memberFatal(String)
Logs the specified message without an Exception at the Fatal level.
Public methodStatic memberFatal(Exception, FuncString)
Logs the specified message with an Exception at the Fatal level. messageFunc will be only called when logging is enabled for level Fatal.
Public methodStatic memberFatal(Exception, String)
Logs the specified message with an Exception at the Fatal level.
Public methodStatic memberFatal(String, Object)
Logs the specified message without an Exception at the Fatal level.
Public methodStatic memberFatal(Exception, String, Object)
Logs the specified message with an Exception at the Fatal level.
Public methodStatic memberFatalTArgument1(String, TArgument1)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberFatalTArgument1, TArgument2(String, TArgument1, TArgument2)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberFatalTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberInfo(FuncString)
Logs the specified message without an Exception at the Info level. messageFunc will be only called when logging is enabled for level Info.
Public methodStatic memberInfo(String)
Logs the specified message without an Exception at the Info level.
Public methodStatic memberInfo(Exception, FuncString)
Logs the specified message with an Exception at the Info level. messageFunc will be only called when logging is enabled for level Info.
Public methodStatic memberInfo(Exception, String)
Logs the specified message with an Exception at the Info level.
Public methodStatic memberInfo(String, Object)
Logs the specified message without an Exception at the Info level.
Public methodStatic memberInfo(Exception, String, Object)
Logs the specified message with an Exception at the Info level.
Public methodStatic memberInfoTArgument1(String, TArgument1)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberInfoTArgument1, TArgument2(String, TArgument1, TArgument2)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberInfoTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberLog(LogLevel, FuncString)
Logs the specified message without an Exception at the specified level. messageFunc will be only called when logging is enabled for level level.
Public methodStatic memberLog(LogLevel, String)
Logs the specified message without an Exception at the specified level.
Public methodStatic memberLog(Exception, LogLevel, FuncString)
Logs the specified message with an Exception at the specified level. messageFunc will be only called when logging is enabled for level level.
Public methodStatic memberLog(Exception, LogLevel, String)
Logs the specified message with an Exception at the specified level.
Public methodStatic memberLog(LogLevel, String, Object)
Logs the specified message without an Exception at the specified level.
Public methodStatic memberLog(Exception, LogLevel, String, Object)
Logs the specified message with an Exception at the specified level.
Public methodStatic memberLogAssemblyVersion
Logs the assembly version and file version of the given Assembly.
Public methodStatic memberReset
Set the config of the InternalLogger with defaults and config.
Public methodStatic memberTrace(FuncString)
Logs the specified message without an Exception at the Trace level. messageFunc will be only called when logging is enabled for level Trace.
Public methodStatic memberTrace(String)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberTrace(Exception, FuncString)
Logs the specified message with an Exception at the Trace level. messageFunc will be only called when logging is enabled for level Trace.
Public methodStatic memberTrace(Exception, String)
Logs the specified message with an Exception at the Trace level.
Public methodStatic memberTrace(String, Object)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberTrace(Exception, String, Object)
Logs the specified message with an Exception at the Trace level.
Public methodStatic memberTraceTArgument1(String, TArgument1)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberTraceTArgument1, TArgument2(String, TArgument1, TArgument2)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberTraceTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberWarn(FuncString)
Logs the specified message without an Exception at the Warn level. messageFunc will be only called when logging is enabled for level Warn.
Public methodStatic memberWarn(String)
Logs the specified message without an Exception at the Warn level.
Public methodStatic memberWarn(Exception, FuncString)
Logs the specified message with an Exception at the Warn level. messageFunc will be only called when logging is enabled for level Warn.
Public methodStatic memberWarn(Exception, String)
Logs the specified message with an Exception at the Warn level.
Public methodStatic memberWarn(String, Object)
Logs the specified message without an Exception at the Warn level.
Public methodStatic memberWarn(Exception, String, Object)
Logs the specified message with an Exception at the Warn level.
Public methodStatic memberWarnTArgument1(String, TArgument1)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberWarnTArgument1, TArgument2(String, TArgument1, TArgument2)
Logs the specified message without an Exception at the Trace level.
Public methodStatic memberWarnTArgument1, TArgument2, TArgument3(String, TArgument1, TArgument2, TArgument3)
Logs the specified message without an Exception at the Trace level.
Top
Events
  NameDescription
Public eventStatic memberLogMessageReceived
Event written to the internal log.
Top
Remarks
Don't use MustBeRethrown(Exception, IInternalLoggerContext, String) as that can lead to recursive calls - stackoverflow
See Also