Re: Reloading appender after property value changes

2016-06-28 Thread Benjamin Jaton
Alright, thanks for you feedback. Here is the JIRA: https://issues.apache.org/jira/browse/LOG4J2-1450 On Tue, Jun 28, 2016 at 3:41 PM, Remko Popma wrote: > I see. With current log4j, you'd need to reload the config then. > > I wouldn't like to implement reloading just one appender (but perhaps

Re: Reloading appender after property value changes

2016-06-28 Thread Remko Popma
I see. With current log4j, you'd need to reload the config then. I wouldn't like to implement reloading just one appender (but perhaps others think differently). Without looking at the code, supporting dynamically evaluation of double $'s in SmtpAppender seems like a good approach. Can you rai

Re: Reloading appender after property value changes

2016-06-28 Thread Benjamin Jaton
Ah I forgot about this trick. It doesn't seem to be supported by the SMTPAppender: --- 2016-06-28 09:30:06,562 main ERROR SmtpManager SMTP:5bea43473970a15b1a4dbd9dcce1c4f6 caught exception while sending e-mail notification.:

Re: Reloading appender after property value changes

2016-06-27 Thread Remko Popma
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 wrote: > > Hello, > > I have a simple appender like: > > { >"type" : "smtp", >

Re: Reloading appender after property value changes

2016-06-27 Thread Benjamin Jaton
I am using a custom LookUp class that implements StrLookup: { "configuration" : { "packages" : "my.custom.logging.plugins", So the monitoringInterval won't detect any change of property that's fed in there. I wonder if it's possible to reload just an appender and not the whole configuratio

Re: Reloading appender after property value changes

2016-06-27 Thread Matt Sicker
I know one simple way would be to use the monitorInterval attribute on Configuration and then touching the file to change its last modified time. There might be a better solution, though. You can programmatically cause a reconfiguration as well. On 27 June 2016 at 13:17, Benjamin Jaton wrote: >

Reloading appender after property value changes

2016-06-27 Thread Benjamin Jaton
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.h