Skip to content

0cc38bd7 0b6a 0ace ffc5 19c06d69a460

Axel Kesseler edited this page Mar 1, 2023 · 1 revision

LogLevelDisasterExtension Class

This extension represents a set of convenience methods for an easier access of Disaster logging messages.

Inheritance Hierarchy

System.Object
  Plexdata.LogWriter.Extensions.LogLevelDisasterExtension
Namespace: Plexdata.LogWriter.Extensions
Assembly: Plexdata.LogWriter.Abstraction (in Plexdata.LogWriter.Abstraction.dll) Version: 1.0.7.1

Syntax

C#

public static class LogLevelDisasterExtension

Methods

 

Name Description
Public methodStatic member Disaster(ILogger, Exception) This method writes the exception into the logger using Disaster as logging level.
Public methodStatic member Disaster(ILogger, String) This method writes the message into the logger using Disaster as logging level.
Public methodStatic member Disaster(ILogger, Exception, ValueTuple(String, Object)[]) This method writes the exception into the logger using Disaster as logging level.
Public methodStatic member Disaster(ILogger, String, Exception) This method writes the message and the exception into the logger using Disaster as logging level.
Public methodStatic member Disaster(ILogger, String, ValueTuple(String, Object)[]) This method writes the message into the logger using Disaster as logging level.
Public methodStatic member Disaster(ILogger, String, Exception, ValueTuple(String, Object)[]) This method writes the message and the exception into the logger using Disaster as logging level.
Public methodStatic member Disaster(TContext)(ILogger(TContext), Exception) This method writes the exception for current TContext into the logger using Disaster as logging level.
Public methodStatic member Disaster(TContext)(ILogger(TContext), String) This method writes the message for current TContext into the logger using Disaster as logging level.
Public methodStatic member Disaster(TScope)(ILogger, TScope, Exception) This method writes the exception for provided scope into the logger using Disaster as logging level.
Public methodStatic member Disaster(TScope)(ILogger, TScope, String) This method writes the message for provided scope into the logger using Disaster as logging level.
Public methodStatic member Disaster(TContext)(ILogger(TContext), Exception, ValueTuple(String, Object)[]) This method writes the exception for current TContext into the logger using Disaster as logging level.
Public methodStatic member 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.
Public methodStatic member Disaster(TContext)(ILogger(TContext), String, ValueTuple(String, Object)[]) This method writes the message for current TContext into the logger using Disaster as logging level.
Public methodStatic member Disaster(TScope)(ILogger, TScope, Exception, ValueTuple(String, Object)[]) This method writes the exception for provided scope into the logger using Disaster as logging level.
Public methodStatic member 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.
Public methodStatic member Disaster(TScope)(ILogger, TScope, String, ValueTuple(String, Object)[]) This method writes the message for provided scope into the logger using Disaster as logging level.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
Public methodStatic member 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.
  Back to Top

Remarks

Internally, all these methods simply call the logger's write method by providing logging level Disaster.

Examples

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.");
        }
    }
}

See Also

Reference

Plexdata.LogWriter.Extensions Namespace

Clone this wiki locally