-
Notifications
You must be signed in to change notification settings - Fork 29
Trigger logging
Koen edited this page Nov 29, 2020
·
1 revision
Triggers are simple DI enabled services, therefore logging can be enabled using
public class MyComplexTrigger : IBeforeSaveTrigger<Customer> {
readonly ILogger _logger;
public MyComplexTrigger(ILogger<MyComplexTrigger> logger) {
_logger = logger;
}
public Task BeforeSave(ITriggerContext<Customer> context, CancellationToken cancellationToken) {
this._logger.LogInformation("Something is happening!");
}
}