Hi Ian,

No, you don't need to do anything to the LoggingEvent class. You create your 
own appender and override the Append(LoggingEvent loggingEvent) method. In this 
function you can access loggingEvent.MessageObject, which will give you the 
message you logged from your code -- in your case, an XML message. At this 
point you have your XML and you can do whatever you want with it.

What type of data do you want to "pass in"? Do you mean to pass in as your 
custom appender configuration, or pass in when you call log.Debug(...), etc?

If you need an example of a custom appender with custom config attributes let 
me know, but it sounds like you're almost there.

Simon.


---------- Original Message ----------------------------------
From: "ian" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
Date:  Mon, 22 Nov 2004 10:38:59 -0500

>Hi 
>
>I need to send in XML data which I then break up and store in a database - any 
>ideas as to the best way to do this? 
>
>I'm looking to create a custom appender, similar to the current ADONet 
>appender by extending the AppenderSkeleton class, and implementing the Append 
>method. 
>
>The trouble is, I'm a little confused when it comes to the LoggingEvent class 
>- am I right in thinking that I'll have to create my own LoggingEvent class to 
>define the data I want to pass in? If so, then I guess I'll also have to 
>override CallAppender in the Logger class to create my new loggingevent 
>object. 
>
>Am I on the right track with this line of thought? 
>
>Thanks in advance 
>
>Ian 
>

Reply via email to