# Hangfire and Serilog

**URL:** <https://discuss.hangfire.io/t/hangfire-and-serilog/3463>\
**Category:** question\
**Tags:** logging\
**Created:** [June 22, 2017, 6:08am UTC](https://discuss.hangfire.io/t/hangfire-and-serilog/3463 "2017-06-22T06:08:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xabi.otano](https://avatars.discourse-cdn.com/v4/letter/x/838e76/32.png) [@xabi.otano](https://discuss.hangfire.io/u/xabi.otano)\
**Post date:** [June 22, 2017, 6:08am UTC](https://discuss.hangfire.io/t/hangfire-and-serilog/3463/1 "2017-06-22T06:08:57Z")

</div>

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.
