You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Nicko Cadell (JIRA)" <ji...@apache.org> on 2005/03/01 00:10:51 UTC

[jira] Created: (LOG4NET-13) Allow SMTPAppender to have replacable parameters in Subject

Allow SMTPAppender to have replacable parameters in Subject
-----------------------------------------------------------

         Key: LOG4NET-13
         URL: http://issues.apache.org/jira/browse/LOG4NET-13
     Project: Log4net
        Type: Improvement
  Components: Appenders  
    Versions: 1.2.9    
 Environment: From sourceforge - 749620 - Jeremy Wiebe - jeropa
    Reporter: Nicko Cadell


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.

Example:
I have multiple web servers running a .NET web service
and all use log4net. When an error occurs, they use the
SMTPAppender to notify me. It would be very useful to
include the host name of the sender in the subject line
so that I could easily determine which web server had
an error instead of having to look into the email.

In thinking more about this it could either be the
Subject line or the From line that has replacable
parameters. Perhaps even make it so that these
properties can use the <layout> tag.

Jeremy Wiebe - jeropa

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (LOG4NET-13) Allow SMTPAppender to have replaceable parameters in Subject

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-13?page=all ]

Nicko Cadell updated LOG4NET-13:
--------------------------------

        Summary: Allow SMTPAppender to have replaceable parameters in Subject  (was: Allow SMTPAppender to have replacable parameters in Subject)
    Description: 
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.

Example:
I have multiple web servers running a .NET web service
and all use log4net. When an error occurs, they use the
SMTPAppender to notify me. It would be very useful to
include the host name of the sender in the subject line
so that I could easily determine which web server had
an error instead of having to look into the email.

In thinking more about this it could either be the
Subject line or the From line that has replacable
parameters. Perhaps even make it so that these
properties can use the <layout> tag.

Jeremy Wiebe - jeropa

  was:
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.

Example:
I have multiple web servers running a .NET web service
and all use log4net. When an error occurs, they use the
SMTPAppender to notify me. It would be very useful to
include the host name of the sender in the subject line
so that I could easily determine which web server had
an error instead of having to look into the email.

In thinking more about this it could either be the
Subject line or the From line that has replacable
parameters. Perhaps even make it so that these
properties can use the <layout> tag.

Jeremy Wiebe - jeropa


> Allow SMTPAppender to have replaceable parameters in Subject
> ------------------------------------------------------------
>
>          Key: LOG4NET-13
>          URL: http://issues.apache.org/jira/browse/LOG4NET-13
>      Project: Log4net
>         Type: Improvement
>   Components: Appenders
>     Versions: 1.2.9
>  Environment: From sourceforge - 749620 - Jeremy Wiebe - jeropa
>     Reporter: Nicko Cadell
>      Fix For: 1.2.10

>
> 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.
> Example:
> I have multiple web servers running a .NET web service
> and all use log4net. When an error occurs, they use the
> SMTPAppender to notify me. It would be very useful to
> include the host name of the sender in the subject line
> so that I could easily determine which web server had
> an error instead of having to look into the email.
> In thinking more about this it could either be the
> Subject line or the From line that has replacable
> parameters. Perhaps even make it so that these
> properties can use the <layout> tag.
> Jeremy Wiebe - jeropa

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (LOG4NET-13) Allow SMTPAppender to have replacable parameters in Subject

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-13?page=all ]
     
Nicko Cadell resolved LOG4NET-13:
---------------------------------

    Fix Version: 1.2.10
     Resolution: Fixed

There is an example appender in the SampleAppendersApp which sends a single event via SMTP email and allows replacable patterns in the email subject line.

See:

examples\net\1.0\Appenders\SampleAppendersApp\cs\src\Appender\SimpleSmtpAppender.cs

> Allow SMTPAppender to have replacable parameters in Subject
> -----------------------------------------------------------
>
>          Key: LOG4NET-13
>          URL: http://issues.apache.org/jira/browse/LOG4NET-13
>      Project: Log4net
>         Type: Improvement
>   Components: Appenders
>     Versions: 1.2.9
>  Environment: From sourceforge - 749620 - Jeremy Wiebe - jeropa
>     Reporter: Nicko Cadell
>      Fix For: 1.2.10

>
> 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.
> Example:
> I have multiple web servers running a .NET web service
> and all use log4net. When an error occurs, they use the
> SMTPAppender to notify me. It would be very useful to
> include the host name of the sender in the subject line
> so that I could easily determine which web server had
> an error instead of having to look into the email.
> In thinking more about this it could either be the
> Subject line or the From line that has replacable
> parameters. Perhaps even make it so that these
> properties can use the <layout> tag.
> Jeremy Wiebe - jeropa

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (LOG4NET-13) Allow SMTPAppender to have replacable parameters in Subject

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LOG4NET-13?page=comments#action_59907 ]
     
Nicko Cadell commented on LOG4NET-13:
-------------------------------------

As the SmtpAppender sends a list of buffered events it would need to pick one event to use for pattern replacement. The From and Subject params could be changed to PatternLayout fields. Then any PatternLayout strings can be used to generate the From and Subject from the selected event.

This would be a breaking change for apps that programmatically configure.

> Allow SMTPAppender to have replacable parameters in Subject
> -----------------------------------------------------------
>
>          Key: LOG4NET-13
>          URL: http://issues.apache.org/jira/browse/LOG4NET-13
>      Project: Log4net
>         Type: Improvement
>   Components: Appenders
>     Versions: 1.2.9
>  Environment: From sourceforge - 749620 - Jeremy Wiebe - jeropa
>     Reporter: Nicko Cadell

>
> 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.
> Example:
> I have multiple web servers running a .NET web service
> and all use log4net. When an error occurs, they use the
> SMTPAppender to notify me. It would be very useful to
> include the host name of the sender in the subject line
> so that I could easily determine which web server had
> an error instead of having to look into the email.
> In thinking more about this it could either be the
> Subject line or the From line that has replacable
> parameters. Perhaps even make it so that these
> properties can use the <layout> tag.
> Jeremy Wiebe - jeropa

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (LOG4NET-13) Allow SMTPAppender to have replaceable parameters in Subject

Posted by "rams.rapo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4NET-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778124#action_12778124 ] 

rams.rapo commented on LOG4NET-13:
----------------------------------

Hi,

I have a similar need in Java application. Can the fix be propagated to log4j implementation for Java. 
I'm using log4j 1.2.15 and had no luck passing run time parameters in subject line set by MDC.

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


> Allow SMTPAppender to have replaceable parameters in Subject
> ------------------------------------------------------------
>
>                 Key: LOG4NET-13
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-13
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 1.2.9
>         Environment: From sourceforge - 749620 - Jeremy Wiebe - jeropa
>            Reporter: Nicko Cadell
>             Fix For: 1.2.10
>
>
> 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.
> Example:
> I have multiple web servers running a .NET web service
> and all use log4net. When an error occurs, they use the
> SMTPAppender to notify me. It would be very useful to
> include the host name of the sender in the subject line
> so that I could easily determine which web server had
> an error instead of having to look into the email.
> In thinking more about this it could either be the
> Subject line or the From line that has replacable
> parameters. Perhaps even make it so that these
> properties can use the <layout> tag.
> Jeremy Wiebe - jeropa

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.