<commit_before>﻿using System;

namespace Umbraco.Core.Logging
{
    /// <summary>
    /// Provides extension methods for the <see cref="ILogger"/> interface.
    /// </summary>
    public static class LoggerExtensions
    {
        /// <summary>
        /// Logs an error message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        /// <param name="exception">An exception.</param>
        public static void Error<T>(this ILogger logger, string message, Exception exception = null)
        {
            logger.Error(typeof(T), message, exception);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="exception">An exception</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Error<T>(this ILogger logger, string messageTemplate, Exception exception = null, params object[] propertyValues)
        {
            logger.Error(typeof(T), messageTemplate, exception, propertyValues);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Warn<T>(this ILogger logger, string message)
        {
            logger.Warn(typeof(T), message);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Warn<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Warn(typeof(T), messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs a formatted warning message with an exception.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="exception">An exception.</param>
        /// <param name="message">A message.</param>
        public static void Warn<T>(this ILogger logger, Exception exception, string message)
        {
            logger.Warn(typeof(T), exception, message);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="exception">An exception</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Warn<T>(this ILogger logger, Exception exception, string messageTemplate, params object[] propertyValues)
        {
            logger.Warn(typeof(T), exception, messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs an information message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Info<T>(this ILogger logger, string message)
        {
            logger.Info(typeof(T), message);
        }

        /// <summary>
        /// Logs a information message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Info<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Info(typeof(T), messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs a debugging message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Debug<T>(this ILogger logger, string message)
        {
            logger.Debug(typeof(T), message);
        }

        /// <summary>
        /// Logs a debugging message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Debug<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Debug(typeof(T), messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs a verbose message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Verbose<T>(this ILogger logger, string message)
        {
            logger.Verbose(typeof(T), message);
        }

        /// <summary>
        /// Logs a Verbose message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Verbose<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Verbose(typeof(T), messageTemplate, propertyValues);
        }

    }
}<commit_msg>Adds the Fatal Logger Extension method <T><commit_after>﻿using System;

namespace Umbraco.Core.Logging
{
    /// <summary>
    /// Provides extension methods for the <see cref="ILogger"/> interface.
    /// </summary>
    public static class LoggerExtensions
    {
        /// <summary>
        /// Logs an error message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        /// <param name="exception">An exception.</param>
        public static void Error<T>(this ILogger logger, string message, Exception exception = null)
        {
            logger.Error(typeof(T), message, exception);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="exception">An exception</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Error<T>(this ILogger logger, string messageTemplate, Exception exception = null, params object[] propertyValues)
        {
            logger.Error(typeof(T), messageTemplate, exception, propertyValues);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Warn<T>(this ILogger logger, string message)
        {
            logger.Warn(typeof(T), message);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Warn<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Warn(typeof(T), messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs a formatted warning message with an exception.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="exception">An exception.</param>
        /// <param name="message">A message.</param>
        public static void Warn<T>(this ILogger logger, Exception exception, string message)
        {
            logger.Warn(typeof(T), exception, message);
        }

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="exception">An exception</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Warn<T>(this ILogger logger, Exception exception, string messageTemplate, params object[] propertyValues)
        {
            logger.Warn(typeof(T), exception, messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs an information message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Info<T>(this ILogger logger, string message)
        {
            logger.Info(typeof(T), message);
        }

        /// <summary>
        /// Logs a information message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Info<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Info(typeof(T), messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs a debugging message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Debug<T>(this ILogger logger, string message)
        {
            logger.Debug(typeof(T), message);
        }

        /// <summary>
        /// Logs a debugging message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Debug<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Debug(typeof(T), messageTemplate, propertyValues);
        }

        /// <summary>
        /// Logs a verbose message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="message">A message.</param>
        public static void Verbose<T>(this ILogger logger, string message)
        {
            logger.Verbose(typeof(T), message);
        }

        /// <summary>
        /// Logs a Verbose message.
        /// </summary>
        /// <typeparam name="T">The reporting type</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Verbose<T>(this ILogger logger, string messageTemplate, params object[] propertyValues)
        {
            logger.Verbose(typeof(T), messageTemplate, propertyValues);
        }


        /// <summary>
        /// Logs a fatal message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="exception">An exception.</param>
        /// <param name="message">A message.</param>
        public static void Fatal<T>(this ILogger logger, Exception exception, string message)
        {
            logger.Fatal(typeof(T), exception, message);
        }


        /// <summary>
        /// Logs a fatal message.
        /// </summary>
        /// <typeparam name="T">The reporting type.</typeparam>
        /// <param name="logger">The logger.</param>
        /// <param name="exception">An exception.</param>
        /// <param name="messageTemplate">A structured message template</param>
        /// <param name="propertyValues">Message property values</param>
        public static void Fatal<T>(this ILogger logger, Exception exception, string messageTemplate, params object[] propertyValues)
        {
            logger.Fatal(typeof(T), exception, messageTemplate, propertyValues);
        }

    }
}
{'fraction_non_alphanumeric': 0.14976440739398333, 'fraction_numerical': 0.0, 'mean_word_length': 2.123386914195155, 'pattern_counts': {'":': 0, '<': 290, '<?xml version=': 0, '>': 290, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5315667', 'n_tokens_mistral': 3442, 'n_tokens_neox': 3436, 'n_words': 920}