[
https://issues.apache.org/jira/browse/LOG4NET-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicko Cadell resolved LOG4NET-91.
---------------------------------
Resolution: Won't Fix
Assignee: Nicko Cadell
As you suggest the code to call the Layout.Format method is simple enough that
the use if the RenderLoggingEvent function is not required.
Also there is an example appender that allows the Subject line to be rendered
from a LayoutPattern in the log4net distribution at
examples\net\1.0\Appenders\SampleAppendersApp\cs\src\Appender\SimpleSmtpAppender.cs
> [PATCH] Add layout param to RenderLoggingEvent function of AppenderSkeleton
> class
> ---------------------------------------------------------------------------------
>
> Key: LOG4NET-91
> URL: https://issues.apache.org/jira/browse/LOG4NET-91
> Project: Log4net
> Issue Type: Improvement
> Affects Versions: 1.2.10
> Reporter: DaBuddhaMan
> Assigned To: Nicko Cadell
> Attachments: AppenderSkeleton.cs.diff, AppenderSkeleton.cs.diff,
> AppenderSkeleton.cs.diff
>
>
> If you want to use layouts on other places then the Layout Property, for
> example if you want to implement a NonBufferedSmtpAppender to use a pattern
> layout for the subject of the mail message instead of a simple string:
> public ILayout Subject
> {
> get { return m_subject; }
> set { m_subject = value; }
> }
> with configuration like this:
> <appender name="smtp" type="log4net.Appender.SmtpAppender, log4net">
> <to value="[EMAIL PROTECTED]" />
> <from value="Test Program" />
> <subject type="log4net.Layout.PatternLayout, log4net">
> <conversionPattern value="LOGMSG: [%logger] %level" />
> </subject>
> ...
> it would be great that we can reuse some code of the AppenderSkeleton class:
> So it would be great to add a layout param to the RenderLoggingEvent function.
> --> RenderLoggingEvent(TextWriter writer, LoggingEvent loggingEvent, ILayout
> layout)
> see the attachment
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.