I’ve had the fortune of being able to sort of sneak IBatis into the environment at work. I used it in a proof-of-concept type application a few months ago and I just loved working with it. It’s so much better than the MS Application Blocks, and raw ADO.NET. I’ve got built-in caching and other goodies.
One thing that’s just been a mystery to me is the logging of generated SQL statements. I want IBatis to basically log all of its activity so that I can see what’s being sent to the database, what’s being prepared, etc. But for the life of me I haven’t been able to figure it out. I use log4net for all of my other logging and would prefer to stick with that for IBatis. The developer guide seems relatively clear on this, as do suggestions from the user community. But I’m at a loss. I’m going to have to break it down to its simplest form and see what I can come up with.
In the meantime, if any of my vast audience of readers have any suggestions, I’m all ears.
Update: Well, I figured it out. Actually, someone emailed me and told me to give something a try. It was so simple that it’s almost embarrassing to admit, but I’d like to get it out there so I don’t make the same mistake again. All I needed was a reference to IBatisNet.Common.Logging.Log4Net. But of course! Now it’s logging so much that my log file is getting pretty monstrous.