What do you think of saving stack trace in a special log table?
java, log4j, logging
Solution
Duplicate logging sounds like... well, duplicate logging. Overhead. If you need to access the logs through database, I would rather use/write a tool that can import the logs to a separate database when needed. Or make them accessible by some other means. One tool that I know of is Splunk, but it's expensive and I'm sure there are others too.
Problem
Suppose, you have a special log table of your application. What do you think about creating a BLOB field for a possible stack trace ? Logging is done to file as well, but it is not so convenient to read a text file, moreover database is more "accessible".