-------- Original-Nachricht -------- > Datum: Fri, 24 Feb 2012 10:29:40 +0100 > Von: Ivan Habunek <[email protected]> > An: Log4php Dev <[email protected]> > Betreff: Proposal: database appender should not create tables
> Hi all, > > The current database appender has an option of creating a table if > none exists. I would prefer that it doesn't. There are two main > reasons: > 1. You cannot be sure that the CREATE TABLE statement will work on > every database. > 2. Since we don't know to which database we're connecting, it is > impossible to deduct which error the database reported (was it "table > not found" or "invalid password"). See current code, it's not nice. > > Instead, I would create a folder where CREATE TABLE statements will be > located for different databases. Similar to the way done on logback: > https://github.com/ceki/logback/tree/master/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect > to store the command in a sql-file looks a bit disgusting. I think the user should do the creation himself. a special-part in the documention should be enough. > Also in the works: > - retry on failed log (to solve LOG4PHP-134) > - adaptations for the new pattern layout which pdo appender uses > > Regards, > Ivan regards florian
