The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.
| Author |
Messages |
|
Dawson Mossman
 |
| 10/23/2005 9:43 PM |
|
Hi, I know the primary purpose of Log4Net is logging capability in your application. However, I'm wondering if it's also used/recommended for Reporting?
I've heard talk of people using Log4Net to generate logging information that they intend to use for creating reports. Is this a recommended strategy? Or should application reporting be kept separate from Log4Net entries?
From what I understand, it's common for Log4Net to be turned off in a production application and only turned on when required to debug a problem. If this is the typical usage, then clearly reporting based on Log4Net would not be recommended.
If you could clear this for me, it would avoid steering several projects in the wrong direction.
Thanks.
|
|
|
|
|
Bloom, Joshua (CASE)
 |
| 10/23/2005 11:15 PM |
|
Hi Dawson,
I have had pretty good results using Log4Net in this fashion.
My setup uses 2 appenders with different level settings.
I have one that logs everything to a log database, and another that only logs error levels(or higher) by SMTP.
Its worked pretty well for me so far.
Cheers, Josh
|
|
|
|
|
Dawson Mossman
 |
| 10/26/2005 5:46 PM |
|
I assume that your reports are based on the logging statements in the DB. How do you accomodate for the different information needed for different reports? Do you log all the logging data as XML to a single database column? If so, how do you take advantage of the query capabilities in the DB, wouldn't you need to get all the records and then parse the XML for each record to determine it's type / information?
Also, are there any tools / third-party products out there for generating reports based on Log4Net logs?
Thanks for the help, Daws
|
|
|
|
|
Nicko Cadell
 |
| 10/30/2005 7:08 PM |
|
Personally I like to give the application/system administrator control over the log4net configuration. It's up to them to decide where they want the application logging information to go. One of the main features of log4net is that the location of the log output can be changed after the application has been deployed.
My applications do not depend on log4net for their functionality, if I disable logging my applications still continue to function.
If I have a functional requirement to record specific reporting information I would probably not use log4net to output it, but would write it directly to a database. It is possible to configure log4net to do some of the work for you, but it is designed to support application logging rather than reporting.
Cheers, Nicko
|
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|