Reputation: 11
I am using a logger in my module.But with new requirement I have to remove the logger from code and use DBA to log all the error in single query.
For this I am planning to use VO class which will take the exception details.But Managers are not accepting this logic.
Can you suggest me any other idea of how we can store all error in dba.
regards
Upvotes: 1
Views: 1056
Reputation: 1806
Apache Common's Logging and Log4J have already been mentioned, but if you plan on going down that route you should also be aware of logback's DBAppender. If that doesn't completely cover your use case you can still always write your own.
Upvotes: 1
Reputation: 309008
If you were using Apache Common Logging and Log4J, you could simply add a database appender and be done with it:
http://code.google.com/p/log4j-databaseappender/
Logging is the "Hello world" of aspect oriented programming. I'd also recommend keeping your logging in one place with an aspect. That way it's easy to change, whatever you are forced to do.
Upvotes: 1