 --#SET TERMINATOR @
-SET CURRENT SCHEMA LOGGER_1 @
-
-SET PATH = SYSPROC, LOGGER_1 @
+SET CURRENT SCHEMA LOGGER_1A @
+
+SET PATH = SYSPROC, LOGGER_1A @
+
+/**
+ * Complete logger name.
+ * TODO Try to create a type instead of a variable
+ */
+ALTER MODULE LOGGER ADD
+  VARIABLE COMPLETE_LOGGER_NAME VARCHAR(256)@
 
 /**
  * Writes the given message in the log table. This is a pure SQL implementation,

ALTER MODULE LOGGER ADD
 FUNCTION GET_LOGGER_NAME (
  IN LOG_ID ANCHOR LOGDATA.CONF_LOGGERS.LOGGER_ID
  ) RETURNS VARCHAR(256)
  LANGUAGE SQL
  PARAMETER CCSID UNICODE
  SPECIFIC F_GET_NAME

  READS SQL DATA
  SECURED
 F_GET_NAME: BEGIN
  DECLARE COMPLETE_NAME ANCHOR COMPLETE_LOGGER_NAME;
  DECLARE PARENT ANCHOR LOGDATA.CONF_LOGGERS.LOGGER_ID;
  DECLARE NAME ANCHOR LOGDATA.CONF_LOGGERS.NAME;
  DECLARE RETURNED ANCHOR COMPLETE_LOGGER_NAME;
  
  -- The logger is ROOT.
  IF (LOG_ID = 0) THEN
