Hi there,
I want Hangfire to use my custom SeriLog logger. ( we are planning to use subloggers)
I see the documentation but I don’t manage to get it working.
We are hosting Serilog in a Nancy Fx.
Can someone attach some snippet of code abouyt how t oconfigure Serilog ? or some hints…
I want for example that ithe logs uses a RollingFile sink,
It¡s possible to tell HangFire in some mode to use my custom instance of Logger ? I saw the configuration accepts a custom LogProvider , is that what I need to do? I am not sure, because I want Hangfire to use Serilog in my way (not in the automated mode)
GlobalConfiguration
.Configuration
.UseSqlServerStorage(
config.TasksConnectionString,
new SqlServerStorageOptions
{
PrepareSchemaIfNecessary = false
}
)
.UseActivator(new NancyHangFireActivator(container));
Many thanks.