I am using Enterprise Library 5.0 and My task is to Log information to Database. For this I used Enterprise Library Logging Application Block with Database Trace Listener.
Now, after few days I found that I need some more information to Log into the Logging.LOG Table. They are : User_ID, Session_ID etc.
Per Business requirements, I can't use ExtendedProperty Property of LogEntry class and store this information in the FormattedMessage column of the Log Table in XML fomrat. I want proper Column with Name "User_ID" and "Session_ID"
in the Log Table of Logging Database.
Question Is: How can I push customized information in the Log Table?
For this I found something called "CustomTraceListener" where we need to override two methods i.e. Write(string Message) & WriteLog(string Message)
* How Can I use this CustomeTraceListener to push custome message to Log Table?
* Write method takes single parameter of type string, means will I get a concatinated string which I need to break into different information and push into database using my own code?
Can someone please send me an implimentation example of CustomeTraceListener to --> Database
Please help me.