From 97d1d3f754e339fa856f5d84371c40d7f435788b Mon Sep 17 00:00:00 2001 From: Atralupus Date: Thu, 19 Oct 2023 17:30:58 +0900 Subject: [PATCH] Change log format for loki --- NineChronicles.Headless/Services/RedisAccessControlService.cs | 3 ++- NineChronicles.Headless/Services/SQLiteAccessControlService.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NineChronicles.Headless/Services/RedisAccessControlService.cs b/NineChronicles.Headless/Services/RedisAccessControlService.cs index 8e0765746..fb5e240aa 100644 --- a/NineChronicles.Headless/Services/RedisAccessControlService.cs +++ b/NineChronicles.Headless/Services/RedisAccessControlService.cs @@ -20,7 +20,8 @@ public bool IsAccessDenied(Address address) var result = _db.KeyExists(address.ToString()); if (result) { - Log.Debug($"{address} is access denied"); + Log.ForContext("Source", nameof(IAccessControlService)) + .Debug("\"{Address}\" is access denied", address); } return result; diff --git a/NineChronicles.Headless/Services/SQLiteAccessControlService.cs b/NineChronicles.Headless/Services/SQLiteAccessControlService.cs index a124ee56d..e3dae9221 100644 --- a/NineChronicles.Headless/Services/SQLiteAccessControlService.cs +++ b/NineChronicles.Headless/Services/SQLiteAccessControlService.cs @@ -40,7 +40,8 @@ public bool IsAccessDenied(Address address) if (result) { - Log.Debug($"{address} is access denied"); + Log.ForContext("Source", nameof(IAccessControlService)) + .Debug("\"{Address}\" is access denied", address); } return result;