/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/SessionAffinity/Log.cs
40 строк
2 KB
Chris Ross
Change default cookie session affinity format #1980 (#1989)
11 янв 2023, 23:47
Не верифицирован
11 янв 2023, 23:47
b311ca7
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using Microsoft.Extensions.Logging; namespace Yarp.ReverseProxy.SessionAffinity; internal static class Log { private static readonly Action<ILogger, string, Exception?> _affinityCannotBeEstablishedBecauseNoDestinationsFound = LoggerMessage.Define<string>( LogLevel.Warning, EventIds.AffinityCannotBeEstablishedBecauseNoDestinationsFoundOnCluster, "The request affinity cannot be established because no destinations are found on cluster `{clusterId}`."); private static readonly Action<ILogger, Exception?> _requestAffinityKeyDecryptionFailed = LoggerMessage.Define( LogLevel.Error, EventIds.RequestAffinityKeyDecryptionFailed, "The request affinity key decryption failed."); private static readonly Action<ILogger, string, Exception?> _destinationMatchingToAffinityKeyNotFound = LoggerMessage.Define<string>( LogLevel.Warning, EventIds.DestinationMatchingToAffinityKeyNotFound, "Destination matching to the request affinity key is not found on cluster `{clusterId}`. Configured failure policy will be applied."); public static void AffinityCannotBeEstablishedBecauseNoDestinationsFound(ILogger logger, string clusterId) { _affinityCannotBeEstablishedBecauseNoDestinationsFound(logger, clusterId, null); } public static void RequestAffinityKeyDecryptionFailed(ILogger logger, Exception? ex) { _requestAffinityKeyDecryptionFailed(logger, ex); } public static void DestinationMatchingToAffinityKeyNotFound(ILogger logger, string clusterId) { _destinationMatchingToAffinityKeyNotFound(logger, clusterId, null); } }