logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Bourouba <kar...@hotmail.com>
Subject RE: Adding custom logging properties
Date Mon, 17 Aug 2009 14:02:18 GMT


Ah, i think I see.
 
Have you considered just logging the XML as a string to the DB, then use something else to
parse it at a latter stage?



 

> Date: Mon, 17 Aug 2009 06:48:42 -0700
> From: adamtappis@hotmail.com
> To: log4net-user@logging.apache.org
> Subject: RE: Adding custom logging properties
> 
> 
> Hi Karim,
> 
> No that's not my question.
> 
> Apart from a custom message I also wish to log some custom event data i.e. a
> collection of properties. The target for this will eventually be a SQL table
> which has an XML type column i.e. rathert han just adding a customerID I
> might have 10 different properties to add.
> 
> Using the global context for this is not an acceptable solution -
> assuggested in one of the other threads I read. 
> 
> 
> Karim Bourouba wrote:
> > 
> > 
> > I have to say I only glanced through this very quickly and I am a little
> > confused. I am at work just now, so my attention is split, please bear
> > with me.
> > 
> > 
> > 
> > Are you asking if custom messages can be logged via log4net? If so, then
> > the quick answer is yes. Implementation is very simple as well, but in
> > case I missed your point can you let us know if this is what you are
> > after?
> > 
> > 
> > 
> > Seems like this is the log4net topic of the day today :)
> > 
> > 
> > 
> > 
> > 
> >> Date: Mon, 17 Aug 2009 06:12:29 -0700
> >> From: adamtappis@hotmail.com
> >> To: log4net-user@logging.apache.org
> >> Subject: Adding custom logging properties
> >> 
> >> 
> >> Hi,
> >> 
> >> I've been evaluating log4net recently with a view to using the framework
> >> as
> >> a loggin standard for our enterprise applicaption. I see it very easy to
> >> extend the framework, however I have some specific logging requirements
> >> and
> >> I'm not sure what would be the easiest way implement these with minimal
> >> coding.
> >> 
> >> At some time in the future, we aim to build a consolidated logging
> >> database
> >> that will capture logging data from our server application suite. The
> >> information that needs to be logged will differ per service/applicaption
> >> and
> >> to that end I would aim to have a table schema that has the standard
> >> logging
> >> columns plus a generic XML column (no defined schema) to act as a
> >> property
> >> bag for custom information associated with a specific event.
> >> 
> >> We don't have time to develop the logging repository at present, however
> >> I'm
> >> stressing that we should build logging into our code from the start
> >> rather
> >> than trying to retro-fitting it later which would be far more costly.
> >> 
> >> So I need my code to be able to fire off logging messages with a list or
> >> arbitrary custom properties that get formatted into an XML string. For
> >> now
> >> the messages can be written to a text file and later we'll configure and
> >> AdoNetAppender to write to out logging database.
> >> 
> >> So my questions are:
> >> - Is this possible using configuration only? (I susopect not)
> >> - If not then which custom objects do I need to create? From what I've
> >> seen
> >> so far I think I'll need to code my own Layout Class
> >> - The ILog interface doesn't doesn't expose a method that takes a
> >> property
> >> bag (or dictionary), but it appears that the LoggingEvent object does.
> >> Does
> >> that mean I would have to make my logging calls using ILog.Logger.Log()?
> >> - Could someone provide some sample code please?
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/Adding-custom-logging-properties-tp25006538p25006538.html
> >> Sent from the Log4net - Users mailing list archive at Nabble.com.
> >> 
> > 
> > _________________________________________________________________
> > Windows Live Messenger: Celebrate 10 amazing years with free winks and
> > emoticons.
> > http://clk.atdmt.com/UKM/go/157562755/direct/01/
> > 
> ;-);-)
> -- 
> View this message in context: http://www.nabble.com/Adding-custom-logging-properties-tp25006538p25007016.html
> Sent from the Log4net - Users mailing list archive at Nabble.com.
> 

_________________________________________________________________

Upgrade to Internet Explorer 8 Optimised for MSN.  

http://extras.uk.msn.com/internet-explorer-8/?ocid=T010MSN07A0716U
Mime
View raw message