Hi Dominik,

 Thanks for your answer. The problem is: Let's say B is some kind of common 
library that other assemblies also reference, so I cannot change the config 
file name for that assembly (because it would be a code change in the logger 
class). 

Probably there is not solution for the problem, like changing the 
log4net-config-file-path for the library via code in the referencing assembly?

Thanks,
Volker

-----Original Message-----
From: Dominik Psenner [mailto:[email protected]] 
Sent: Dienstag, 14. August 2012 08:43
To: 'Log4NET User'
Subject: RE: Assemblies with loggers which use different config-files

Hi Volker,

> How can I achieve that B also uses the log4net-config-file of A (for 
> definition of levels etc.)?

You could create a configuration file C that contains the definitions you need 
in A and B and reference C in A and B. I.e.:

  C
 / \
A   B

Literally said:
 A depends C
 B depends C

What you should not do is create a cycle in the dependencies, i.e.:

  A
 / \
 \ /
  B

Literally said:
 A depends B
 B depends A

Cheers

Reply via email to