From 670f03cafe2237c5b6ff102a6fa19205a3e3a13b Mon Sep 17 00:00:00 2001 From: "agile.zhou" Date: Wed, 26 Jun 2024 22:16:54 +0800 Subject: [PATCH] Update log message --- src/AgileConfig.Server.Apisite/Metrics/MeterService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AgileConfig.Server.Apisite/Metrics/MeterService.cs b/src/AgileConfig.Server.Apisite/Metrics/MeterService.cs index e4cd0318..1c01942e 100644 --- a/src/AgileConfig.Server.Apisite/Metrics/MeterService.cs +++ b/src/AgileConfig.Server.Apisite/Metrics/MeterService.cs @@ -59,10 +59,10 @@ public MeterService(IServiceScopeFactory sf) { _resourceMonitor = sp.GetService(); } - catch (Exception ex) + catch { var logger = sp.GetService().CreateLogger(); - logger.LogWarning(ex, "Failed to get IResourceMonitor, maybe you are using cgroups v2, currently is not supported."); + logger.LogWarning("Failed to get IResourceMonitor, maybe you are using cgroups v2, currently is not supported."); } AppGauge = AgileConfigMeter.CreateObservableGauge("AppCount", () =>