From: Gavin_King/Cirrus%<CI...@ci...> - 2002-04-19 07:04:16
|
> [snip] We'd > prefer not to have to use some other logging mechanism, so of course it > would be nice (but not essential) if we could supply a custom log object > which exposed logging interface(s) for Hibernate to use, so events would be > logged within our own system. > >I haven't used log4j, so don't know how it might fit into this picture. If >you did use something like that, it would be nice if it were done in a >pluggable way. Hopefully that wouldn't require too much work. Someone else suggested we use the apache commons logging framework which basically just abstracts log4j, jdk 1.4 logging and potentially any other logging infrastructure you might want to use. I just wrote (in my real job) an adaptor for WebSphere's JRas logging API and that was easy enough. You can swap log implementations using a properties file. I might go with that. (An alternative approach would be to write a log4j appender for your logging API but I don't think thats as good.) > BTW, (changing subject) today I wrote a little XSL template to generate Java > bean skeletons ("DTOs") from the Hibernate mapping XML. It needs a few > enhancements currently, but I'll clean it up and post it over the next few > days. I used Xalan so it should work directly with a standard Hibernate > distribution, without requiring any additional libraries. Excellent. I wouldn't have thought of using XSLT for this though its a very obvious (and good) approach now you mention it :) I think Brad Clow has something similar but I havn't seen it yet so I don't know how similar.... |