Skip to content

Commit

Permalink
Merge pull request #90 from LeeMustache/89-task-update-logging
Browse files Browse the repository at this point in the history
T #89 Add group to command execution logging
  • Loading branch information
HueByte committed Sep 16, 2022
2 parents 0449c77 + caa949b commit 8574ee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Huppy/Huppy.App/Middlewares/CommandLogMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task AfterAsync(ExtendedShardedInteractionContext context, ICommand

CommandLog log = new()
{
CommandName = commandInfo.Name,
CommandName = commandInfo.ToString(),
Date = DateTime.UtcNow,
IsSuccess = result.IsSuccess,
UserId = context.User.Id,
Expand All @@ -45,7 +45,7 @@ public async Task AfterAsync(ExtendedShardedInteractionContext context, ICommand

if (result.IsSuccess)
{
_logger.LogInformation("Command [{CommandName}] executed for [{Username}] in [{GuildName}] [{time} ms]", commandInfo.Name, context.User.Username, context.Guild.Name, string.Format("{0:n0}", watch.ElapsedMilliseconds));
_logger.LogInformation("Command [{CommandName}] executed for [{Username}] in [{GuildName}] [{time} ms]", commandInfo.ToString(), context.User.Username, context.Guild.Name, string.Format("{0:n0}", watch.ElapsedMilliseconds));
}
else
{
Expand Down

0 comments on commit 8574ee7

Please sign in to comment.