From bade35691bc84ff09a8deaa2fb1330541d815798 Mon Sep 17 00:00:00 2001 From: lindexi Date: Wed, 18 Sep 2024 16:29:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=96=B9=E6=B3=95=E9=87=8D?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Templates/AggregateLoggerBridgeLinker.g.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dotnetCampus.Logger.Analyzer/Assets/Templates/AggregateLoggerBridgeLinker.g.cs b/src/dotnetCampus.Logger.Analyzer/Assets/Templates/AggregateLoggerBridgeLinker.g.cs index a5d6d43..b554e85 100644 --- a/src/dotnetCampus.Logger.Analyzer/Assets/Templates/AggregateLoggerBridgeLinker.g.cs +++ b/src/dotnetCampus.Logger.Analyzer/Assets/Templates/AggregateLoggerBridgeLinker.g.cs @@ -19,6 +19,12 @@ partial class AggregateLoggerBridgeLinker : GILoggerBridgeLinker /// public static AggregateLoggerBridgeLinker Default { get; } = new(); + public bool IsEnabled(int logLevel) + { + var logger = _logger ?? GLog.Current; + return logger.IsEnabled((GLogLevel)logLevel); + } + private GILogger? _logger; ///