log4Net logging

Hangfire uses liblog internally, so it binds automatically to log4net if available in your project.

Usually all hangfire loggers have this strict naming convention (Hangfire.*) and this allows you easily to filter them out of the general log4net stream. Just try this:

<logger additivity="false" name="Hangfire">
   <level value="INFO" />
   <appender-ref ref="HangfireLoggerAppender" />
</logger>>

2 Likes