Workshell / tempus

Simple job scheduler for .NET
MIT License
43 stars 1 forks source link

Logging in ASP.NET Core #13

Open samuraiGH opened 5 hours ago

samuraiGH commented 5 hours ago

how can I log failures that occurred in an asp.net core application?

my code:

builder.Services.AddTempus();
builder.Services.AddTempusJob<NotifyJob>();
lkinsella commented 3 hours ago

What kind of failures?

IJobScheduler has a JobError event you can subscribe to for unhandled exceptions, however we tend to have a try...catch within the job itself and inject an ILogger and log there.