DXP log4net

Vote:
 

Is it possible the have different EPiServerLog.config for every DXP enviroment? I mean integration, preprod and Prod...

How can I do that?

#230105
Oct 29, 2020 21:02
Vote:
 

Hi Juan

Sure you can transform that config file. But you should generally not use log4net in Episerver DXP (see Logging).

If you always log to Episerver's logging abstraction, then Episerver will write to log4net locally. But for Integration, Preproduction and Production it will disable log4net and instead use .Net Diagnostics trace and Azure Application Insights.

#230106
Oct 29, 2020 21:13
Vote:
 

Thanks @Stefan for your response.

The thing is that we are using a centralize log server that use log4net, the log server is SEQ and I just need to add a new appender in the current EPiServerLog.config and it will add events to the log server.

#230107
Oct 29, 2020 21:21
Vote:
 

Then you can either:

  1. Use SlowCheetah to transform the config files.
  2. Write your own implementation of the trace logger interface, to connect to SEQ (instead of Azure). Look at this page for more info.

I would probably opt for number 2. But either way, you will need to ask Episerver Support to change the trace logger factory type (in DXP) to the type you end up using.

#230108
Oct 29, 2020 21:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.