feat: more log context
This commit is contained in:
parent
4047df8610
commit
7749c9d9e2
21 changed files with 159 additions and 15 deletions
|
|
@ -35,6 +35,8 @@ public class RoleCreateResponder(
|
|||
|
||||
public async Task<Result> RespondAsync(IGuildRoleCreate evt, CancellationToken ct = default)
|
||||
{
|
||||
using var _ = LogUtils.Enrich(evt);
|
||||
|
||||
_logger.Debug("Received new role {RoleId} in guild {GuildId}", evt.Role.ID, evt.GuildID);
|
||||
roleCache.Set(evt.Role, evt.GuildID);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public class RoleDeleteResponder(
|
|||
|
||||
public async Task<Result> RespondAsync(IGuildRoleDelete evt, CancellationToken ct = default)
|
||||
{
|
||||
using var __ = LogUtils.Enrich(evt);
|
||||
|
||||
try
|
||||
{
|
||||
if (!roleCache.TryGet(evt.RoleID, out var role))
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public class RoleUpdateResponder(
|
|||
|
||||
public async Task<Result> RespondAsync(IGuildRoleUpdate evt, CancellationToken ct = default)
|
||||
{
|
||||
using var _ = LogUtils.Enrich(evt);
|
||||
|
||||
try
|
||||
{
|
||||
var newRole = evt.Role;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue