logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Duane <nic...@msn.com>
Subject layout being reused?
Date Fri, 18 Sep 2015 19:05:24 GMT
I seem to have run into an issue where either an instance of a layout object is being reused
in another appender or it's reusing the params under a layout.  Here is what I did:

<appender ...>
   ...
   <layout ...>
      <myprop value="..."/>
   </layout>
</appender>
...
<appender ...>
   ...
   <layout ...>
   </layout>
</appender>

To my surprise, the layout in the second (lower) appender above had the "myprop" property
set to the value from the first appender's layout.  By the way, both layouts are the same
type.  It's a custom layout I wrote.

Thankfully, if I set the property in both layouts to a different value, each layout has the
correct value.  So the problem seems to be that if a layout takes a parameter and you don't
supply it you might end up getting the value set based on it being set in a previous layout.

Can someone verify that this is indeed an issue?

Thanks,
Nick

 		 	   		  
Mime
View raw message