void appendLog ( String formattedMessage ) { if ( logTruncated ) return ; String combined = join ( getLog ( ) , formattedMessage ) ; if ( combined . length ( ) > MAX_LOG_LENGTH ) { String truncated = abbreviate ( combined , MAX_LOG_LENGTH - TRUNCATION_BANNER . length ( ) * 2 - 2 ) ; combined = join ( new String [ ] { TRUNCATION_BANNER , truncated , TRUNCATION_BANNER } , "\n" ) ; logTruncated = true ; } setLog ( combined ) ; }
Appends a log message to the execution log . The first time the log exceeds MAX_LOG_LENGTH it gets truncated and the TRUNCATION_BANNER gets added . Subsequent calls to appendLog will be ignored .