• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class DnnLogger

Please use LoggerSource.Instance as a more unit testable way to create loggers.

Inheritance
System.Object
DnnLogger
Namespace: DotNetNuke.Instrumentation
Assembly: DotNetNuke.Instrumentation.dll
Syntax
public sealed class DnnLogger : LoggerWrapperImpl

Methods

| Improve this Doc View Source

Debug(Object)

Logs a message object with the DEBUG level.

Declaration
public void Debug(object message)
Parameters
Type Name Description
System.Object message

The message object to log.

Remarks

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the Error(Object, Exception) form instead.

| Improve this Doc View Source

DebugFormat(IFormatProvider, String, Object[])

Logs a formatted message string with the DEBUG level.

Declaration
public void DebugFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An that supplies culture-specific formatting information.

System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

This method does not take an object to include in the log event. To pass an use one of the Debug(Object) methods instead.

| Improve this Doc View Source

DebugFormat(String, Object[])

Logs a formatted message string with the DEBUG level.

Declaration
public void DebugFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

The string is formatted using the format provider. To specify a localized provider use the DebugFormat(IFormatProvider, String, Object[]) method.

This method does not take an object to include in the log event. To pass an use one of the Debug(Object) methods instead.

| Improve this Doc View Source

Error(Object, Exception)

Logs a message object with the ERROR level.

Declaration
public void Error(object message, Exception exception)
Parameters
Type Name Description
System.Object message

The message object to log.

Exception exception

The exception to log, including its stack trace.

Remarks

Logs a message object with the ERROR level including the stack trace of the exception passed as a parameter.

See the Error(Object) form for more detailed information.

See Also
Error(Object)
| Improve this Doc View Source

Error(Object)

Logs a message object with the ERROR level.

Declaration
public void Error(object message)
Parameters
Type Name Description
System.Object message

The message object to log.

Remarks

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the Error(Object, Exception) form instead.

| Improve this Doc View Source

ErrorFormat(IFormatProvider, String, Object[])

Logs a formatted message string with the ERROR level.

Declaration
public void ErrorFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An that supplies culture-specific formatting information.

System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

This method does not take an object to include in the log event. To pass an use one of the Error(Object) methods instead.

| Improve this Doc View Source

ErrorFormat(String, Object[])

Logs a formatted message string with the ERROR level.

Declaration
public void ErrorFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

The string is formatted using the format provider. To specify a localized provider use the ErrorFormat(IFormatProvider, String, Object[]) method.

This method does not take an object to include in the log event. To pass an use one of the Error(Object) methods instead.

| Improve this Doc View Source

Fatal(Object, Exception)

Logs a message object with the FATAL level.

Declaration
public void Fatal(object message, Exception exception)
Parameters
Type Name Description
System.Object message

The message object to log.

Exception exception

The exception to log, including its stack trace.

Remarks

Logs a message object with the FATAL level including the stack trace of the exception passed as a parameter.

See the Fatal(Object) form for more detailed information.

See Also
Fatal(Object)
| Improve this Doc View Source

Fatal(Object)

Logs a message object with the FATAL level.

Declaration
public void Fatal(object message)
Parameters
Type Name Description
System.Object message

The message object to log.

Remarks

This method first checks if this logger is FATAL enabled by comparing the level of this logger with the FATAL level. If this logger is FATAL enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the Fatal(Object, Exception) form instead.

| Improve this Doc View Source

FatalFormat(IFormatProvider, String, Object[])

Logs a formatted message string with the FATAL level.

Declaration
public void FatalFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An that supplies culture-specific formatting information.

System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

This method does not take an object to include in the log event. To pass an use one of the Fatal(Object) methods instead.

| Improve this Doc View Source

FatalFormat(String, Object[])

Logs a formatted message string with the FATAL level.

Declaration
public void FatalFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

The string is formatted using the format provider. To specify a localized provider use the FatalFormat(IFormatProvider, String, Object[]) method.

This method does not take an object to include in the log event. To pass an use one of the Fatal(Object) methods instead.

| Improve this Doc View Source

GetClassLogger(Type)

Gets the logger for the given type.

Declaration
public static DnnLogger GetClassLogger(Type type)
Parameters
Type Name Description
Type type

The type for which to get a logger instance.

Returns
Type Description
DnnLogger

A new DnnLogger instance.

| Improve this Doc View Source

GetLogger(String)

Gets the logger for the given name.

Declaration
public static DnnLogger GetLogger(string name)
Parameters
Type Name Description
System.String name

The name for the logger instance.

Returns
Type Description
DnnLogger

A new DnnLogger instance.

| Improve this Doc View Source

Info(Object)

Logs a message object with the INFO level.

Declaration
public void Info(object message)
Parameters
Type Name Description
System.Object message

The message object to log.

Remarks

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the Error(Object, Exception) form instead.

| Improve this Doc View Source

InfoFormat(IFormatProvider, String, Object[])

Logs a formatted message string with the INFO level.

Declaration
public void InfoFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An that supplies culture-specific formatting information.

System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

This method does not take an object to include in the log event. To pass an use one of the Info(Object) methods instead.

| Improve this Doc View Source

InfoFormat(String, Object[])

Logs a formatted message string with the INFO level.

Declaration
public void InfoFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

The string is formatted using the format provider. To specify a localized provider use the InfoFormat(IFormatProvider, String, Object[]) method.

This method does not take an object to include in the log event. To pass an use one of the Info(Object) methods instead.

| Improve this Doc View Source

InstallLogError(Object)

Logs an install message at the Error log level.

Declaration
public void InstallLogError(object message)
Parameters
Type Name Description
System.Object message

The message to log.

| Improve this Doc View Source

InstallLogError(String, Exception)

Log an install message and exception details at the Error log level.

Declaration
public void InstallLogError(string message, Exception exception)
Parameters
Type Name Description
System.String message

An object to display as the message.

Exception exception

An exception to include in the log.

| Improve this Doc View Source

InstallLogErrorFormat(IFormatProvider, String, Object[])

Log an install message at the Error log level.

Declaration
public void InstallLogErrorFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An object that supplies culture-specific formatting information.

System.String format

A composite format string.

System.Object[] args

An object array that contains zero or more objects to format.

| Improve this Doc View Source

InstallLogErrorFormat(String, Object[])

Log an install message at the Error log level.

Declaration
public void InstallLogErrorFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A composite format string.

System.Object[] args

An object array that contains zero or more objects to format.

| Improve this Doc View Source

InstallLogInfo(Object)

Logs an install message at the Info log level.

Declaration
public void InstallLogInfo(object message)
Parameters
Type Name Description
System.Object message

The message to log.

| Improve this Doc View Source

InstallLogInfoFormat(IFormatProvider, String, Object[])

Log an install message at the Info log level.

Declaration
public void InstallLogInfoFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An object that supplies culture-specific formatting information.

System.String format

A composite format string.

System.Object[] args

An object array that contains zero or more objects to format.

| Improve this Doc View Source

InstallLogInfoFormat(String, Object[])

Log an install message at the Info log level.

Declaration
public void InstallLogInfoFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A composite format string.

System.Object[] args

An object array that contains zero or more objects to format.

| Improve this Doc View Source

Warn(Object, Exception)

Logs a message object with the WARN level.

Declaration
public void Warn(object message, Exception exception)
Parameters
Type Name Description
System.Object message

The message object to log.

Exception exception

The exception to log, including its stack trace.

Remarks

Logs a message object with the WARN level including the stack trace of the exception passed as a parameter.

See the Warn(Object) form for more detailed information.

See Also
Warn(Object)
| Improve this Doc View Source

Warn(Object)

Logs a message object with the WARN level.

Declaration
public void Warn(object message)
Parameters
Type Name Description
System.Object message

the message object to log.

Remarks

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate . It then proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

WARNING Note that passing an to this method will print the name of the but no stack trace. To print a stack trace use the Warn(Object, Exception) form instead.

| Improve this Doc View Source

WarnFormat(IFormatProvider, String, Object[])

Logs a formatted message string with the WARN level.

Declaration
public void WarnFormat(IFormatProvider provider, string format, params object[] args)
Parameters
Type Name Description
IFormatProvider provider

An that supplies culture-specific formatting information.

System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

This method does not take an object to include in the log event. To pass an use one of the Warn(Object) methods instead.

| Improve this Doc View Source

WarnFormat(String, Object[])

Logs a formatted message string with the WARN level.

Declaration
public void WarnFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format

A String containing zero or more format items.

System.Object[] args

An Object array containing zero or more objects to format.

Remarks

The message is formatted using the method. See String.Format for details of the syntax of the format string and the behavior of the formatting.

The string is formatted using the format provider. To specify a localized provider use the WarnFormat(IFormatProvider, String, Object[]) method.

This method does not take an object to include in the log event. To pass an use one of the Warn(Object) methods instead.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS