-
Notifications
You must be signed in to change notification settings - Fork 2
Error codes
These are the possible error codes raised by log4db2
The following errors appear when calling the utility.
Conventions
Descriptive message
- Error description.
- User response.
LEVEL_ID should be equal to or greater than zero.
- When inserting into the
LEVELStable, anyLEVEL_IDprovided should be greater or equal to zero.- Reissue the insert statement with a
LEVEL_IDgreater than zero.
- Reissue the insert statement with a
LEVEL_ID should be consecutive to the previous maximal value.
- When inserting into the
LEVELStable, it is not possible to have gaps in theLEVEL_IDvalues.- Check the current maximal value in the
LEVELStable, and try aLEVEL_IDwith a value ofMAX + 1.
- Check the current maximal value in the
It is not possible to change the LEVEL_ID.
- Once a
LEVEL_IDhas been inserted in aLEVELSrow, it cannot be modified. There could be references to this value in other tables (for exampleLOGS) without enforcing the referential integrity. If this value is modified, it will appear incoherent. At the same time, it is not possible to assign a new value without creating gaps in the table.- Delete values and re-insert, them to adapt the structure to your requirements.
Trying to delete the minimal value.
- The operation is trying to delete the minimal value which is 0, and this is not allowed because there must be at least a defined level in the
LEVELStable.- Delete other values, but not the minimal one.
The only possible LEVEL_ID to delete is the maximal value.
- The issued statement is trying to delete a
LEVEL_IDdifferent from the maximal in theLEVELStable. It is prohibited because this will create gaps in the list ofLEVELS.- You must delete levels by deleting the maximal
LEVEL_IDvalue.
- You must delete levels by deleting the maximal
The given logger name has not been found.
- When trying to register or update a level logger with the
LOGADMIN.REGISTER_LOGGERprocedure, the given level name is not valid.- Check the level enterer. The name should match a level from the
LEVELStable. By default they are in lower case: off, fatal, error, warn, info, debug.
- Check the level enterer. The name should match a level from the
The only logger without a parent is ROOT.
- All loggers should have a parent. The only one that does not have ascendancy is
ROOT.- Assign a parent to the provided logger. Probably, its parent will be
ROOT(0).
- Assign a parent to the provided logger. Probably, its parent will be
It is not possible to update any value in this table (only LEVEL_ID is possible).
- Once a logger has been created, most of its properties cannot be changed. The
LOGGER_IDhelps to uniquely identify it.NAMEis a unique value in the hierarchy.PARENT_IDindicates its ancestry.- Do not try to modify the values of a logger. If a logger was misdefined, create a new one (new
LOGGER_ID, correctNAME, probably samePARENT_ID).
- Do not try to modify the values of a logger. If a logger was misdefined, create a new one (new
There could be only one ROOT logger
- Trying to insert a second
ROOTlogger with values (ID= 0,PARENT=NULL), however, it already exists in the table.- This operation is not permitted, insert other levels different from
ROOT.
- This operation is not permitted, insert other levels different from
The only logger without a parent is ROOT.
- All loggers should have a parent. The only one that does not have ascendancy is
ROOT. Remember that this table is managed by the utility, this means that the users do not have to modify it directly.- Assign a parent to the provided logger. Probably, its parent will be
ROOT(0).
- Assign a parent to the provided logger. Probably, its parent will be
It is not possible to update any value in this table (only LEVEL_ID is possible).
- Once a logger has been created, most of its properties cannot be changed. The
LOGGER_IDhelps to uniquely identify it.NAMEis a unique value in the hierarchy.PARENT_IDindicates its ancestry. Remember that this table is managed by the utility, this means that the users do not have to modify it directly.- Do not try to modify the values of a logger. If a logger was misdefined, create a new one (new
LOGGER_ID, correctNAME, probably samePARENT_ID).
- Do not try to modify the values of a logger. If a logger was misdefined, create a new one (new
It is not possible to update the LEVEL_ID manually.
- The
LEVEL_IDis updated when the associated configuration in theCONF_LOGGERStable is modified. However, this value cannot be modified manually, and it should match the established value in the configuration table.- Update the
LEVEL_IDto the same level defined in theCONF_LOGGERStable.
- Update the
ROOT logger cannot be deleted.
- There should always exist the
ROOTlogger in theCONF_LOGGERS_EFFECTIVEtable. It cannot be deleted, because this is the origin of the ancestry for any level.- If you are deleting in bulk (
DELETE FROM CONF_LOGGERS_EFEFCTIVE) put a condition to not delete theROOTlogger.
- If you are deleting in bulk (
Inserting a duplicate logger.
- It already exists a logger with the same name in the same position of the hierarchy (same
PARENT_ID).- Use the existing
LOGGER_IDor change the name for the logger in the same level of the hierarchy. You can also change thePARENT_ID, but that changes the logger in the hierarchy with another ascendancy/descendancy.
- Use the existing
APPENDER_ID for appenders should be greater or equal to zero.
- Any
APPENDER_IDshould be greater or equal to zero, and the statement is issuing a negative value.- Reissue the statement with a positive or zero value.
Invalid parameter.
- The provided value to call the function is not a valid value. It is probably a null value or a negative one.
- Reissue the command calling the function with a positive or zero value.
- The call has arrived at the limit in cascade call and the log could not be written correctly. It was written as
ROOTlogger and an error was returned to the caller application. This message wraps the SQL Code SQL0724, SQLState 54038.- Control this error in the application.
In order to continue the execution:
DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001' DO_SOMETHING;
Invalid configuration state
- The loggers' cache is trying to be activated or deactivated, but the configuration is the opposite of the requested function. This behavior should never be an issue for the user because the procedures used (
ACTIVATE_CACHEandDEACTIVATE_CACHE) are called by triggers.- Reissue the command with the appropriated function according to the configuration.
For example:
- ACTIVATE_CACHE -> internalCache = true
- DEACTIVATE_CACHE -> internalCache = false
##Messages in the LOGS table##
Some error conditions are reported in the LOGS table. They describe the internal behavior of the utility.
- A manual
CONF_LOGGERS_EFFECTIVEupdate should be realized.- The
defaultRootLevelIdconfiguration value has been changed.ROOTlogger and eventually other loggers do not have a defined level, and they have to be changed with the new configuration value. This cannot be automatically done (there is a trigger issue), and the user needs to update theROOTlogger in order to update these values.
- The
UPDATE LOGDATA.CONF_LOGGERS
SET LEVEL_ID = 0
WHERE LOGGER_ID = 0;



