layout being reused?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

layout being reused?

Nicholas Duane
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