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

--#SET TERMINATOR @
SET CURRENT SCHEMA LOGGER_1 @

SET PATH = SYSPROC, LOGGER_1 @

/**
 * Writes the given message in the log table. This is a pure SQL implementation,

  CALL LOG (LOGGER_ID, 1, MESSAGE);
 END P_FATAL @

-- View modified to retrieve the logger name.
CREATE OR REPLACE VIEW LOGDATA.LOG_MESSAGES 
  (DATE, LEVEL, LOGGER, MESSAGE) AS
  SELECT L.DATE, LE.NAME, LOGGER.GET_LOGGER_NAME(L.LOGGER_ID), L.MESSAGE
