You could use log4j and use an appropriate apppender, like detailed in this question
The problem is that JDBCAppender is deprecated. Here is another solution if you really need this functionality : log4j-databaseappender, however it is very sparse on documentation (exactly, almost none), is a bit old, and has only one owner, but might serve as a good starting point if you want to roll your own. At least the code is small.
As for log4j, I'd certainly not try to reinvent the wheel and create another logging framework, when there is a readymade solution for a generic problem. If however you use another framework (which you didn't specify), I'm sure it would make the lives of your fellow colleagues easier not having to cope with different methods of logging... At least I'd be happy to see uniform logging instructions in the code I have to work on...