I want to implement a Custom logger which logs all log entries to a Database. Currently my app logs this way (slf4j and log4j binding):
private static final
You do not have to write your own logging implementation, how about switching the logging framework to logback? Loback supports logging to database natively. As you use the SLF4J API both times your code won't change.
Take a look at the ch.qos.logback.classic.db.DBAppender. If the default table layout does not fit your needs, you can implement ch.qos.logback.classic.db.names.DBNameResolver to customzie the table and coloum names.