angoca / log4db2

A logging utility like log4j for IBM Db2 SQL PL
https://angoca.github.io/log4db2/
BSD 2-Clause "Simplified" License
6 stars 2 forks source link

Mechanism to block manual inserts in CONF_LOGGERS #181

Open angoca opened 9 years ago

angoca commented 9 years ago

When there are manual inserts in the CONF_LOGGERS table, the values are not reflected in the conf_loggers_effective table. This impacts the hierarchy, because it is not created.

There should be a mechanism with a trigger, that does not allow to insert, if a lock in another table is inserted, indicating the logger_name (probably complete).

The trigger will read the current logger_name, get the complete logger name, query the locks table to see if a lock with the same logger name has been defined. If it has been defined, then the trigger will allow to continue, because it shows that the method inserting the value is GET_LOGGER and not another. If the lock does not exist in the other table, then cancel the transaction.