Updating code to use _logger instead of Console.writeLine
This commit is contained in:
parent
ba1c3861f4
commit
2c88b7f1c9
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<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\resharper-host\local\Transient\ReSharperHost\v193\SolutionCaches\_ChaosBot.-595872383.00" t="ExcludeRecursive" />
|
||||
<e p="C:\Users\sean\OneDrive\Documents\Development\DotNet\ChaosBot" t="IncludeFlat">
|
||||
|
||||
@ -75,13 +75,13 @@ namespace ChaosBot.Discord.Services
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -10,8 +10,6 @@
|
||||
"Prefix": "!"
|
||||
},
|
||||
"NLog": {
|
||||
"internalLogLevel": "Info",
|
||||
"internalLogFile": "c:\\temp\\internal-nlog.txt",
|
||||
"extensions": {
|
||||
"NLog.Web.AspNetCore": {
|
||||
"assembly": "NLog.Web.AspNetCore"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user