logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ceki <c...@qos.ch>
Subject Re: SMTPAppender & MDC
Date Thu, 07 Jun 2012 09:40:31 GMT
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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message