Hi,
I setup my application to receive email on error via STMPAppender. I
have multiple environment (Dev, Test, Staging and Production) and I
would like to have the environment name in the message.
I have an envionment variable target-environment on I tried to put it in
the parternLayout like:
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="${target-environment} %d{HH:mm:ss} %-5p %.11X{StationConfig}
%.20c{1} - %.100m%n"/>
</layout>
But it doesn't work, the logger crashes.
Does somebody have an idea or should I extend the SMTPAppender to add
this environment variable as parameter and insert it in the message
myself.
Regards
Dominique
|