Christian, As it turns out, Log4j2 has a JDBC appender, which can be configured to suit your needs.
You can find more information out about it here: https://logging.apache.org/log4j/2.x/manual/appenders.html#JDBCAppender I've personally not run into a use case where a database-backed appender was an ideal solution, but it exists as an option. ~Jason On Fri, Nov 22, 2013 at 6:13 PM, Christian Schneider < [email protected]> wrote: > Hi, our application runs on several nodes and sometimes there are some long > running processes. > During this processes we collect logs of different types. > For example: > * Current Env. information (like IP-Address, OS Name, ...) > * Urls and their statuscodes, > * Erros (Stacktraces) thrown during the process > * Some logging of execution times of sub tasks > * Some counts of different events > * Information about loaded plugins from the classpath > and stuff like that. > > At the end we need to browse through this data (e.g. with a WebUI from a > database) to react on the things that may happened during the process. > > Because the types so different, it would be nice to have an own logging > facade. Something like this: > > interface ProcessLoggingFacade { > > public void info(String ipAddress, OS osType, ...); > > public void info(Url url, int statuscode); > > public void error(String msg, Throwable e); > // .... > } > > The impl. of this facade should parse all calls and store them into > different tables of a remote database. > > Do you think this is a good approach and it is possible with log4j? > > Thanks, > > Best Regards, > Christian. >
