[prev in list] [next in list] [prev in thread] [next in thread]
List: log4net-dev
Subject: [jira] Commented: (LOG4NET-214) EventLogAppender should also use
From: "Vincent Guigui (JIRA)" <jira () apache ! org>
Date: 2009-05-11 16:21:45
Message-ID: 982581945.1242058905597.JavaMail.jira () brutus
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/LOG4NET-214?page=com.atlassian.jira.plugin \
.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708099#action_12708099 ]
Vincent Guigui commented on LOG4NET-214:
----------------------------------------
The EventLogAppender.cs should be modified as followed
/// <summary>
/// The eventId to use when logging
/// </summary>
private int m_eventId;
public int EventId
{
get { return m_eventId; }
set { m_eventId = value; }
}
override protected void Append(LoggingEvent loggingEvent)
{
...
if (eventIDPropertyObj != null)
{
...
}
else
eventID = m_eventId;
...
}
> EventLogAppender should also use config file to set EventId
> -----------------------------------------------------------
>
> Key: LOG4NET-214
> URL: https://issues.apache.org/jira/browse/LOG4NET-214
> Project: Log4net
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 1.2.10
> Reporter: Vincent Guigui
>
> It should be possible to set the EventId of the EventLogAppender using the config \
> file. example:
> IT would like to be able to setup EventId for certain error without having to \
> recompile the application: <appender name="EventLogAppender_Terminated" \
> type="log4net.Appender.EventLogAppender" > <applicationName value="..." />
> <eventId value="1234" />
> <layout type="log4net.Layout.PatternLayout">
> <conversionPattern value="........." />
> </layout>
> <filter type="log4net.Filter.LevelRangeFilter">
> <levelMin value="ERROR" />
> </filter>
> <filter type="log4net.Filter.StringMatchFilter">
> <stringToMatch value="DatabaseException" />
> </filter>
> <filter type="log4net.Filter.DenyAllFilter" />
> </appender>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic