logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Reloading appender after property value changes
Date Mon, 27 Jun 2016 22:36:45 GMT
Have you tried configuring with two leading '$' characters?

http://logging.apache.org/log4j/2.x/manual/configuration.html#RuntimeLookup


Sent from my iPhone

> On 2016/06/28, at 3:17, Benjamin Jaton <benjamin.jaton@gmail.com> wrote:
> 
> Hello,
> 
> I have a simple appender like:
> 
> {
>        "type" : "smtp",
>        "name" : "EmailAppender",
>        "subject" : "${email.subject}",
>        "to" : "${email.recipient}",
>        "from" : "${email.from}",
>        "smtpProtocol" : "${email.smtp.protocol}",
>        "smtpHost" : "${email.smtp.host}",
>        "smtpPort" : "${email.smtp.port}",
>        "smtpUsername" : "${email.smtp.username}",
>        "smtpPassword" : "${email.smtp.password}"
> }
> 
> When I have a updated value for one of those property (for example
> ${email.subject} has changed, what's the simplest way to reload the
> appender so that it takes that new value?
> Do we have to force a full reconfiguration?
> 
> Thanks
> Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message