-
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
LEVELS
table, anyLEVEL_ID
provided should be greater or equal to zero.- Reissue the insert statement with a
LEVEL_ID
greater than zero.
- Reissue the insert statement with a
LEVEL_ID
should be consecutive to the previous maximal value.
- When inserting into the
LEVELS
table, it is not possible to have gaps in theLEVEL_ID
values.- Check the current maximal value in the
LEVELS
table, and try aLEVEL_ID
with a value ofMAX + 1
.
- Check the current maximal value in the
It is not possible to change the LEVEL_ID
.
- Once a
LEVEL_ID
has been inserted in aLEVELS
row, 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
LEVELS
table.- 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_ID
different from the maximal in theLEVELS
table. It is prohibited because this will create gaps in the list ofLEVELS
.- You must delete levels by deleting the maximal
LEVEL_ID
value.
- 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_LOGGER
procedure, the given level name is not valid.- Check the level enterer. The name should match a level from the
LEVELS
table. 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_ID
helps to uniquely identify it.NAME
is a unique value in the hierarchy.PARENT_ID
indicates 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
ROOT
logger 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_ID
helps to uniquely identify it.NAME
is a unique value in the hierarchy.PARENT_ID
indicates 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_ID
is updated when the associated configuration in theCONF_LOGGERS
table is modified. However, this value cannot be modified manually, and it should match the established value in the configuration table.- Update the
LEVEL_ID
to the same level defined in theCONF_LOGGERS
table.
- Update the
ROOT
logger cannot be deleted.
- There should always exist the
ROOT
logger in theCONF_LOGGERS_EFFECTIVE
table. 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 theROOT
logger.
- 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_ID
or 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_ID
should 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
ROOT
logger 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_CACHE
andDEACTIVATE_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_EFFECTIVE
update should be realized.- The
defaultRootLevelId
configuration value has been changed.ROOT
logger 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 theROOT
logger in order to update these values.
- The
UPDATE LOGDATA.CONF_LOGGERS
SET LEVEL_ID = 0
WHERE LOGGER_ID = 0;