From 6625e8ceacc2c7c390e5161a5dcb01a8e3a9f28c Mon Sep 17 00:00:00 2001 From: Sean Stoves Date: Wed, 5 Aug 2020 19:27:22 -0400 Subject: [PATCH] Adding Dynamic to Exception --- ChaosBot/Discord/Modules/Admin/Clear.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChaosBot/Discord/Modules/Admin/Clear.cs b/ChaosBot/Discord/Modules/Admin/Clear.cs index 458d6e5..5392f62 100644 --- a/ChaosBot/Discord/Modules/Admin/Clear.cs +++ b/ChaosBot/Discord/Modules/Admin/Clear.cs @@ -3,6 +3,7 @@ using Discord; using Discord.Commands; using System.Threading.Tasks; using System.Collections.Generic; +using System.Reflection; using ChaosBot.Discord.PreConditions; using NLog; @@ -30,7 +31,7 @@ namespace ChaosBot.Discord.Modules.Admin { if(ex.Message.Contains("Messages must be younger than two weeks old.")) await ReplyAsync($"{Context.User.Mention}, You cannot delete messages older then 2 weeks old."); - _logger.Error($"AdminCommands.ClearCommand: Exception [{ex}] thrown, <[{ex.Message}]>."); + _logger.Error($"{MethodBase.GetCurrentMethod().ReflectedType.FullName}: Exception [{ex}] thrown, <[{ex.Message}]>."); } } }