What are some logging standards for an enterprise application?
Does anyone have any white papers on this topic?
What are some logging standards for an enterprise application?
Does anyone have any white papers on this topic?
See the Microsoft Enterprise Library. It includes the Logging Application Block and that documentation might be what you are looking for. You can see the MSDN Documentation HERE without having to install the library first. Specifficly, see Key Scenarios and Design of the Logging Application Block to answer your question (maybe even if you are not using .NET).
There are tons of logging frameworks out there including log4net and log4j, but the right one for you will depend on your platform and system.
The best logging techniques will depend largely on your platform and the design of your system. You need to know/decide how much information you need to diagnose a particular type of problem. Generally, you should instrument your code in a way that does not require a lot of code repetition or modification. Logging frameworks in .NET that use Attributed classes and methods are a good example of low-impact instrumentation. You should also be able to modify the level of logging (Low through Verbose) through configuration without having to shut down or restart any services.
some tips :
- log no more than necessary in release/production;
- log error ever, if possible make this :
- put log operation in temp var (vector/list);
- at the end if no errors occurs, discard logs, in another case sendo to log file;
- create flag to control level of info to log;
- control log behavior in production/development environment;
- control concurrency access at log file;
- control how much long file log is need;
- control how much time file log should be maintained;
- sometimes is need to perform performance verification, put timers where necessary;