https://issues.apache.org/bugzilla/show_bug.cgi?id=48200

           Summary: Allow SMTPAppender to have replaceable parameters in
                    Subject using MDC
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Other
        AssignedTo: [email protected]
        ReportedBy: [email protected]


It would be helpful to be able to have parameters that
are replaced on a per-log event basis on the Subject
line for the SMTPAppender. These parameters would be set using Log4J MDC. 

I have tried configuring log4j.xml with dynamic parameters, however it didn't
work. 


<param name="Subject" value="Error from Application. Client IP -
[%X{clientIP}], Server IP - [%X{serverIP}]" /> 


Basically i'm trying to have ip address of client from where the request came
and server which encountered the error in subject line itself. I have to
manually open each mail now!

I have set client ip, server ip using MDC in servlet filter which processes all
requests coming to application.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to