Updating code to use _logger instead of Console.writeLine

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-06-02 23:55:32 -04:00
parent ba1c3861f4
commit 2c88b7f1c9
3 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ContentModelStore"> <component name="ContentModelStore">
<e p="C:\Users\sean\.Rider2019.3\config\scratches" t="IncludeRecursive" />
<e p="C:\Users\sean\.Rider2019.3\system\extResources" t="IncludeRecursive" /> <e p="C:\Users\sean\.Rider2019.3\system\extResources" t="IncludeRecursive" />
<e p="C:\Users\sean\.Rider2019.3\system\resharper-host\local\Transient\ReSharperHost\v193\SolutionCaches\_ChaosBot.-595872383.00" t="ExcludeRecursive" /> <e p="C:\Users\sean\.Rider2019.3\system\resharper-host\local\Transient\ReSharperHost\v193\SolutionCaches\_ChaosBot.-595872383.00" t="ExcludeRecursive" />
<e p="C:\Users\sean\OneDrive\Documents\Development\DotNet\ChaosBot" t="IncludeFlat"> <e p="C:\Users\sean\OneDrive\Documents\Development\DotNet\ChaosBot" t="IncludeFlat">

View File

@ -75,13 +75,13 @@ namespace ChaosBot.Discord.Services
{ {
if (!command.IsSpecified) if (!command.IsSpecified)
{ {
System.Console.WriteLine($"Command failed to execute for [{context.User.Username}] <-> [{result.ErrorReason}]!"); _logger.Error($"Command failed to execute for [{context.User.Username}] <-> [{result.ErrorReason}]!");
return; return;
} }
if (result.IsSuccess) if (result.IsSuccess)
{ {
System.Console.WriteLine($"Command [{command.Value.Name}] executed for -> [{context.User.Username}]"); _logger.Info($"Command [{command.Value.Name}] executed for -> [{context.User.Username}]");
return; return;
} }

View File

@ -10,8 +10,6 @@
"Prefix": "!" "Prefix": "!"
}, },
"NLog": { "NLog": {
"internalLogLevel": "Info",
"internalLogFile": "c:\\temp\\internal-nlog.txt",
"extensions": { "extensions": {
"NLog.Web.AspNetCore": { "NLog.Web.AspNetCore": {
"assembly": "NLog.Web.AspNetCore" "assembly": "NLog.Web.AspNetCore"