> > I'm already developing an output module for feeding an Oracle > > database with rsyslog input. [...] But, in principle, the module > > does what you'd expect from it: [...] > > If I didn't screw up, everything should be committed now.
I just checked. It is. I've also tested the changes you applied and work perfectly. Thanks a lot for the reviews!! :) > There are a couple of subtleties, but I think it can work. In essence, > you need a template that feeds into the values via ($template!) and > also a config string for the prepared statement. It's actually not > even that hard to do. It may be useful (and of course doable) to > enable the property replace to escape special characters, so that, for > example, we could use CSV and replace commas by two of them. Making properties in CSV format is indeed a good idea. > > I bet it works. But it's probably too ugly for users. Cleaner ways > > may need deeper changes into rsyslog's API so that the module gets > > direct access to each field. That's probably a lot of work and I > > can't wait for that. > I need to check if there are actually larger changes required. The > main reason for this interface initially was security (do not pass to > the module the full object). It's a good reason. If it's easy to generate and pass a deep copy of the object (and it's not a performance killer, it shouldn't), we can discuss it. Otherwise, I don't think this is worth the effort. > Assuming that I have the object available > at the time of the plugin call, I could use a different entry point to > pass that data in. If so, that would not be too much effort. Security > concerns could be (somewhat) addressed by a config statement which > enables such object access for the next action, so one could > specifically grant that privilege. I'm not quite sure about this: if two entries request direct access to the same object, one is buggy and modifies it, then the second one can suffer unpredictable consequences. I think it's better to pass a deep copy, free it once the module call returns, and do it only for modules that actually need that new entry point. If such deep copies are expensive, then we are just fine the way we are now. Cheers. -- Luis Fernando Muñoz Mejías [email protected] _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

