Skip to content

Commit

Permalink
LogInformation
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhu committed Oct 4, 2024
1 parent df6e916 commit e958b66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Templates/EventHandlers/.created.cs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class {itemname}CreatedEventHandler : INotificationHandler<{itemname}Crea
}
public Task Handle({itemname}CreatedEvent notification, CancellationToken cancellationToken)
{
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().FullName);
_logger.LogInformation("Handled domain event '{EventType}' with notification: {@Notification} ", notification.GetType().Name, notification);
return Task.CompletedTask;
}
}
2 changes: 1 addition & 1 deletion src/Templates/EventHandlers/.deleted.cs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace {namespace};
}
public Task Handle({itemname}DeletedEvent notification, CancellationToken cancellationToken)
{
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().FullName);
_logger.LogInformation("Handled domain event '{EventType}' with notification: {@Notification} ", notification.GetType().Name, notification);
return Task.CompletedTask;
}
}
2 changes: 1 addition & 1 deletion src/Templates/EventHandlers/.updated.cs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace {namespace};
}
public Task Handle({itemname}UpdatedEvent notification, CancellationToken cancellationToken)
{
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().FullName);
_logger.LogInformation("Handled domain event '{EventType}' with notification: {@Notification} ", notification.GetType().Name, notification);
return Task.CompletedTask;
}
}

0 comments on commit e958b66

Please sign in to comment.