views:

46

answers:

2

In my Grails application, I run some batch processes asynchronously, and would like the process to log various status messages so that the administrator later can examine them.

I thought of using log4j JDBC appender as the simplest solution, but from what I can tell it doesn't use DataSource. Has anybody gotten it to work or wrote their own Grails DB Appender?

Did anybody have a similar requirement, and how did you implement it?

I can create a notion of Job, which hasMany LoggingMessages, but thought perhaps there is a standard way or a plugin that does this.

P.S. There was a somewhat related discussion a few weeks ago, but that one was about a different aspect than what I need. http://grails.1312388.n4.nabble.com/Async-Event-that-publishes-progress-td2303653.html

+2  A: 

Someone seems to have written a version of the log4j JDBC appender that does use a datasource and adds some other nice features. Have a look at this blog entry by the author.

Don Roby
+1  A: 

If you want to consider stand alone log server, I'd recommend this tool. It would accept log data over sockets and persist them. Works with many database brands too. Very simple to set up. It's not a free tool though...

Dima