Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

log4net reload on change #5291


User avatar
0
ivanosw1 created

Hi, how can I configure log4net in Abp Core 5.3.0 to reload configuration when log4net.config change?

I've tried the old way but doesn't works.

<appSettings>
  <add key="log4net.Config" value="log4net.config"/>
  <add key="log4net.Config.Watch" value="True"/>
</appSettings>

It is possible?

Thanks


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Castle.Log4Net/Castle/Logging/Log4Net/Log4NetLoggerFactory.cs#L31])

    This does not reload after the configuration information has been changed. However, XmlConfigurator provides ConfigureAndWatch methods, perhaps adding a parameter to the Log4NetLoggerFactory to determine whether reloading is enabled.

    [https://github.com/aspnetboilerplate/aspnetboilerplate/pull/3553])

  • User Avatar
    0
    ivanosw1 created

    Good ! Thank you for the quick fix.

  • User Avatar
    0
    maliming created
    Support Team

    you're welcome :)