[common] improve logging

This commit is contained in:
Andriy
2022-12-14 12:58:12 +02:00
parent 82129d8006
commit ffffe2a48a
4 changed files with 32 additions and 3 deletions
+4 -1
View File
@@ -33,7 +33,10 @@ namespace West.Entertainment.Handler
{
if (!_userService.IsUserSuper(From))
{
_logger.LogInformation("{User} attempted to call /cooldowns in \"{Chat}\"", From, Chat.Title);
_logger.LogWarning("{User} attempted to use super-user command /cooldowns in {Chat}",
From.ToLog(),
Chat.ToLog()
);
return;
}
+4 -1
View File
@@ -43,7 +43,10 @@ public class Roll : CommonHandler
{
if (!_userService.IsUserSuper(From))
{
_logger.LogWarning("{user} attempted to use super-user command", From.ToLog());
_logger.LogWarning("{User} attempted to use super-user command /reset_roll in {Chat}",
From.ToLog(),
Chat.ToLog()
);
return;
}