MODULE imgdef_log; !+ ! ABSTRACT: ! Message and error logging routines for the Image Definition utility. ! ! HISTORY: ! March 1988 SPR 13180 Travisano ! Creation. !- CONSTANT debug_on = FALSE; PROCEDURE log ( str : STRING ); DECLARE err_log_open : STATIC BOOLEAN; DECLARE err_log : STATIC FILE; IF NOT err_log_open THEN OPEN FILE ( err_log ) AS 'SYS$ERROR' FOR OUTPUT; err_log_open = TRUE; END IF; WRITE FILE ( err_log ) str; END PROCEDURE; /* log */ PROCEDURE debug ( str : STRING ); IF debug_on THEN CALL log ( '[*DEBUG*] ' & str ); END IF; END PROCEDURE; /* debug */ PROCEDURE put_error ( str : STRING ); CALL log ( '*** ' & str ); END PROCEDURE; /* put_error */ END MODULE; /* imgdef_log */