Skip to content

Commit

Permalink
T #89 Add group to command execution logging
Browse files Browse the repository at this point in the history
  • Loading branch information
HueByte committed Sep 16, 2022
1 parent 0249ab8 commit 0167d0b
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 0167d0b

Please sign in to comment.