logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <cschneiderpub...@gmail.com>
Subject Custom Log Messages that get forwarded to a database (JPA or JDBC)
Date Sat, 23 Nov 2013 01:13:59 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message