-
Notifications
You must be signed in to change notification settings - Fork 0
0cc38bd7 0b6a 0ace ffc5 19c06d69a460
Axel Kesseler edited this page Mar 1, 2023
·
1 revision
This extension represents a set of convenience methods for an easier access of Disaster logging messages.
System.Object
Plexdata.LogWriter.Extensions.LogLevelDisasterExtension
Namespace: Plexdata.LogWriter.Extensions
Assembly: Plexdata.LogWriter.Abstraction (in Plexdata.LogWriter.Abstraction.dll) Version: 1.0.7.1
C#
public static class LogLevelDisasterExtension
Name | Description | |
---|---|---|
Disaster(ILogger, Exception) | This method writes the exception into the logger using Disaster as logging level. | |
Disaster(ILogger, String) | This method writes the message into the logger using Disaster as logging level. | |
Disaster(ILogger, Exception, ValueTuple(String, Object)[]) | This method writes the exception into the logger using Disaster as logging level. | |
Disaster(ILogger, String, Exception) | This method writes the message and the exception into the logger using Disaster as logging level. | |
Disaster(ILogger, String, ValueTuple(String, Object)[]) | This method writes the message into the logger using Disaster as logging level. | |
Disaster(ILogger, String, Exception, ValueTuple(String, Object)[]) | This method writes the message and the exception into the logger using Disaster as logging level. | |
Disaster(TContext)(ILogger(TContext), Exception) | This method writes the exception for current TContext into the logger using Disaster as logging level. | |
Disaster(TContext)(ILogger(TContext), String) | This method writes the message for current TContext into the logger using Disaster as logging level. | |
Disaster(TScope)(ILogger, TScope, Exception) | This method writes the exception for provided scope into the logger using Disaster as logging level. | |
Disaster(TScope)(ILogger, TScope, String) | This method writes the message for provided scope into the logger using Disaster as logging level. | |
Disaster(TContext)(ILogger(TContext), Exception, ValueTuple(String, Object)[]) | This method writes the exception for current TContext into the logger using Disaster as logging level. | |
Disaster(TContext)(ILogger(TContext), String, Exception) | This method writes the message and the exception for current TContext into the logger using Disaster as logging level. | |
Disaster(TContext)(ILogger(TContext), String, ValueTuple(String, Object)[]) | This method writes the message for current TContext into the logger using Disaster as logging level. | |
Disaster(TScope)(ILogger, TScope, Exception, ValueTuple(String, Object)[]) | This method writes the exception for provided scope into the logger using Disaster as logging level. | |
Disaster(TScope)(ILogger, TScope, String, Exception) | This method writes the message and the exception for provided scope into the logger using Disaster as logging level. | |
Disaster(TScope)(ILogger, TScope, String, ValueTuple(String, Object)[]) | This method writes the message for provided scope into the logger using Disaster as logging level. | |
Disaster(TContext)(ILogger(TContext), String, Exception, ValueTuple(String, Object)[]) | This method writes the message and the exception for current TContext into the logger using Disaster as logging level. | |
Disaster(TScope)(ILogger, TScope, String, Exception, ValueTuple(String, Object)[]) | This method writes the message and the exception for provided scope into the logger using Disaster as logging level. | |
Disaster(TContext, TScope)(ILogger(TContext), TScope, Exception) | This method writes the exception for current TContext taking provided scope into the logger using Disaster as logging level. | |
Disaster(TContext, TScope)(ILogger(TContext), TScope, String) | This method writes the message for current TContext taking provided scope into the logger using Disaster as logging level. | |
Disaster(TContext, TScope)(ILogger(TContext), TScope, Exception, ValueTuple(String, Object)[]) | This method writes the exception for current TContext taking provided scope into the logger using Disaster as logging level. | |
Disaster(TContext, TScope)(ILogger(TContext), TScope, String, Exception) | This method writes the message and the exception for current TContext taking provided scope into the logger using Disaster as logging level. | |
Disaster(TContext, TScope)(ILogger(TContext), TScope, String, ValueTuple(String, Object)[]) | This method writes the message for current TContext taking provided scope into the logger using Disaster as logging level. | |
Disaster(TContext, TScope)(ILogger(TContext), TScope, String, Exception, ValueTuple(String, Object)[]) | This method writes the message and the exception for current TContext taking provided scope into the logger using Disaster as logging level. |
Internally, all these methods simply call the logger's write method by providing logging level Disaster.
Code snippet below shows a fully qualified example of how to use logger extension method Disaster(ILogger, String).
using Plexdata.LogWriter.Abstraction;
using Plexdata.LogWriter.Extensions;
using System;
namespace Plexdata.LogWriter.Example
{
public class SomeClass
{
private readonly ILogger logger;
public SomeClass(ILogger logger)
{
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
public void SomeMethod()
{
this.logger.Disaster("This is a Disaster logging entry.");
}
}
}