Log without HttpContext in ElmahCore

183 views Asked by At

I'm using ElmahCore in an ASP.net Core applicaiton,

in the docs I can see you can log manually using an extension method for the HttpContext, but I can't find anywhere how to log an error manually without having the HttpContext (from a background worker for example)

1

There are 1 answers

1
buga On BEST ANSWER

you have to call ElmahExtensions.RaiseError(ex);

(found it in the issues https://github.com/ElmahCore/ElmahCore/issues/113 )