Show / Hide Table of Contents

Class AspNetCoreLoggerExtensions

Inheritance
System.Object
AspNetCoreLoggerExtensions
Namespace:Microsoft.Extensions.Logging
Assembly:InfinniPlatform.Core.Abstractions.dll
Syntax
public static class AspNetCoreLoggerExtensions : object

Methods

| Improve this Doc View Source

GetFullMessage(Exception)

Gets a full message of the exception, including its inner exceptions.

Declaration
public static string GetFullMessage(this Exception exception)
Parameters
Type Name Description
Exception exception
Returns
Type Description
System.String
| Improve this Doc View Source

GetFullStackTrace(Exception)

Gets a full stack trace of the exception, including its inner exceptions.

Declaration
public static string GetFullStackTrace(this Exception exception)
Parameters
Type Name Description
Exception exception
Returns
Type Description
System.String
| Improve this Doc View Source

LogCritical(ILogger, Exception, Func<Dictionary<String, Object>>)

Formats and writes a critical log message.

Declaration
public static void LogCritical(this ILogger logger, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogCritical(ILogger, String, Exception, Func<Dictionary<String, Object>>)

Formats and writes a critical log message.

Declaration
public static void LogCritical(this ILogger logger, string message, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogCritical(ILogger, String, Func<Dictionary<String, Object>>)

Formats and writes a critical log message.

Declaration
public static void LogCritical(this ILogger logger, string message, Func<Dictionary<string, object>> context)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogDebug(ILogger, Exception, Func<Dictionary<String, Object>>)

Formats and writes a debug log message.

Declaration
public static void LogDebug(this ILogger logger, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogDebug(ILogger, String, Exception, Func<Dictionary<String, Object>>)

Formats and writes a debug log message.

Declaration
public static void LogDebug(this ILogger logger, string message, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogDebug(ILogger, String, Func<Dictionary<String, Object>>)

Formats and writes a debug log message.

Declaration
public static void LogDebug(this ILogger logger, string message, Func<Dictionary<string, object>> context)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogError(ILogger, Exception, Func<Dictionary<String, Object>>)

Formats and writes an error log message.

Declaration
public static void LogError(this ILogger logger, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogError(ILogger, String, Exception, Func<Dictionary<String, Object>>)

Formats and writes an error log message.

Declaration
public static void LogError(this ILogger logger, string message, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogError(ILogger, String, Func<Dictionary<String, Object>>)

Formats and writes an error log message.

Declaration
public static void LogError(this ILogger logger, string message, Func<Dictionary<string, object>> context)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogInformation(ILogger, Exception, Func<Dictionary<String, Object>>)

Formats and writes an informational log message.

Declaration
public static void LogInformation(this ILogger logger, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogInformation(ILogger, String, Exception, Func<Dictionary<String, Object>>)

Formats and writes an informational log message.

Declaration
public static void LogInformation(this ILogger logger, string message, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogInformation(ILogger, String, Func<Dictionary<String, Object>>)

Formats and writes an informational log message.

Declaration
public static void LogInformation(this ILogger logger, string message, Func<Dictionary<string, object>> context)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogWarning(ILogger, Exception, Func<Dictionary<String, Object>>)

Formats and writes a warning log message.

Declaration
public static void LogWarning(this ILogger logger, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogWarning(ILogger, String, Exception, Func<Dictionary<String, Object>>)

Formats and writes a warning log message.

Declaration
public static void LogWarning(this ILogger logger, string message, Exception exception, Func<Dictionary<string, object>> context = null)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Exception exception

The exception to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

| Improve this Doc View Source

LogWarning(ILogger, String, Func<Dictionary<String, Object>>)

Formats and writes a warning log message.

Declaration
public static void LogWarning(this ILogger logger, string message, Func<Dictionary<string, object>> context)
Parameters
Type Name Description
ILogger logger

The to write to.

System.String message

The message to log.

Func<Dictionary<System.String, System.Object>> context

The contextual information to log.

  • Improve this Doc
  • View Source
Back to top © Copyright Infinnity Solutions Ltd, 2010–2017.