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.