<commit_before>// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;

namespace Microsoft.Extensions.Logging
{
    internal static class LoggingExtensions
    {
        private static Action<ILogger, Exception> _tokenValidationFailed;
        private static Action<ILogger, Exception?> _tokenValidationSucceeded;
        private static Action<ILogger, Exception> _errorProcessingMessage;

        static LoggingExtensions()
        {
            _tokenValidationFailed = LoggerMessage.Define(
                eventId: new EventId(1, "TokenValidationFailed"),
                logLevel: LogLevel.Information,
                formatString: "Failed to validate the token.");
            _tokenValidationSucceeded = LoggerMessage.Define(
                eventId: new EventId(2, "TokenValidationSucceeded"),
                logLevel: LogLevel.Information,
                formatString: "Successfully validated the token.");
            _errorProcessingMessage = LoggerMessage.Define(
                eventId: new EventId(3, "ProcessingMessageFailed"),
                logLevel: LogLevel.Error,
                formatString: "Exception occurred while processing message.");
        }

        public static void TokenValidationFailed(this ILogger logger, Exception ex)<commit_msg>Change the log level of JwtBearer (#33271)<commit_after>// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;

namespace Microsoft.Extensions.Logging
{
    internal static class LoggingExtensions
    {
        private static Action<ILogger, Exception> _tokenValidationFailed;
        private static Action<ILogger, Exception?> _tokenValidationSucceeded;
        private static Action<ILogger, Exception> _errorProcessingMessage;

        static LoggingExtensions()
        {
            _tokenValidationFailed = LoggerMessage.Define(
                eventId: new EventId(1, "TokenValidationFailed"),
                logLevel: LogLevel.Information,
                formatString: "Failed to validate the token.");
            _tokenValidationSucceeded = LoggerMessage.Define(
                eventId: new EventId(2, "TokenValidationSucceeded"),
                logLevel: LogLevel.Debug,
                formatString: "Successfully validated the token.");
            _errorProcessingMessage = LoggerMessage.Define(
                eventId: new EventId(3, "ProcessingMessageFailed"),
                logLevel: LogLevel.Error,
                formatString: "Exception occurred while processing message.");
        }

        public static void TokenValidationFailed(this ILogger logger, Exception ex)
{'fraction_non_alphanumeric': 0.07115044247787611, 'fraction_numerical': 0.005309734513274336, 'mean_word_length': 2.7331571994715986, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4891826', 'n_tokens_mistral': 676, 'n_tokens_neox': 632, 'n_words': 201}