Re: SMTPAppender MDC

2012-06-07 Thread ceki

Hi Zbynek,

Have you looked at logback? Its SMTPAppender [1] supports dynamically
setting the destination, thus addressing your requirement.

See also the document entitled Triggering an email containing the 
isolated logs of selected transactions [2] and in particular the 
section Selective triggering  recipient addressing with transaction 
isolation.


HTH,

[1] http://logback.qos.ch/manual/appenders.html#SMTPAppender
[2] http://logback.qos.ch/recipes/emailPerTransaction.html

--
Ceki
http://twitter.com/#!/ceki

On 07.06.2012 11:08, Zbynek Vavros wrote:


Hi,

Im using SMTPAppender with MDC to send emails with custom subject
and its working very nicely.

Now, I would like to specify email receivers according to MDC value, like :
MDC=a -  1...@email.com, 2...@email.com
MDC=b -  3...@emai..com, 4...@email.com

Is it possible via configuration ??

Thanks a lot

Zbynek



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



Re: SMTPAppender MDC

2012-06-07 Thread Jacob Kjome


Alternatively, if you want to stick with Log4j, try.

http://openutils.sourceforge.net/openutils-log4j/smtpappender.html


Jake


On Thu, 07 Jun 2012 11:40:31 +0200
 ceki c...@qos.ch wrote:

Hi Zbynek,

Have you looked at logback? Its SMTPAppender [1] supports dynamically
setting the destination, thus addressing your requirement.

See also the document entitled Triggering an email containing the isolated 
logs of selected transactions [2] and in particular the section Selective 
triggering  recipient addressing with transaction isolation.


HTH,

[1] http://logback.qos.ch/manual/appenders.html#SMTPAppender
[2] http://logback.qos.ch/recipes/emailPerTransaction.html

--
Ceki
http://twitter.com/#!/ceki

On 07.06.2012 11:08, Zbynek Vavros wrote:


Hi,

Im using SMTPAppender with MDC to send emails with custom subject
and its working very nicely.

Now, I would like to specify email receivers according to MDC value, like :
MDC=a -  1...@email.com, 2...@email.com
MDC=b -  3...@emai..com, 4...@email.com

Is it possible via configuration ??

Thanks a lot

Zbynek



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





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