Is it possible to use ILog below with Azure Function logging or Serilog etc?
I cannot find code example on how to use it.
Rebus.Logging.ILog
.Options(o =>
{
o.Decorate<IErrorHandler>(c =>
new ErrorMessageHandler(c.Get<IErrorHandler>(), c.Get<ILog>()));
It's certainly possibly – but since Rebus' loggers are created with a type (the type works as a context of sorts – I think Serilog calls it "source context"), you do not inject the logger, you inject a logger factory:
and then, in the constructor of
ErrorMessageHandler, you can get the logger: