[syslog-ng] afsql dbi initialization errors checks

Hendrik Visage hvjunk at gmail.com
Mon Feb 14 11:47:50 CET 2011


Hi there,

 Busy compiling (more like porting) syslog-ng 3.2 to HP-UX 11.31, and I've
been hitting a few snags that I since over come, but now I hit one where I
see the source code is not checking whether the afsql got a proper DBI
initialization, nor whether the actual driver is available before starting
the db thread/etc.

I've modified the lines 988-990 below, where they were just a simple
"dbi_initialize();". On my setup, it "initialized", but with 0 drivers
available :( (No, I DO have installed the Postgrsql dbi-driver, so yes I'll
be debugging the DBI side now :()

   986    if (!dbi_initialized)
   987      {
   988+        msg_error("HVT: dbi_initialization",
   989=
evt_tag_int("status",dbi_initialize("/opt/hvsyslog-ng3/lib/dbd")
),
   990+          NULL);
   991        dbi_initialized = TRUE;
   992      }

I also would like syslog-ng to a check at startup time and to  rather exit
with an error if the requested DBI driver is not available, than to wait
till the messages starts to stream in and then to throw screens full of
errors :(


Hendrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20110214/a73963a6/attachment.htm 


More information about the syslog-ng mailing list