Skip to content

Commit 3a4554f

Browse files
committed
Print out some indication where the error was found in the log file
1 parent 9be9133 commit 3a4554f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Utilities/Tools/jobutils.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ taskwrapper() {
193193
# basically --> send kill to all children
194194
if [ "$RC" != "" -a "$RC" != "0" ]; then
195195
echo "Detected critical problem in logfile $logfile"
196+
if [ "${JOBUTILS_PRINT_ON_ERROR}" ]; then
197+
grepcommand="grep -H -A 2 -B 2 ${pattern} $logfile ${JOBUTILS_JOB_SUPERVISEDFILES}"
198+
eval ${grepcommand}
199+
fi
196200

197201
# this gives some possibility to customize the wrapper
198202
# and do some special task at the start. The hook takes 2 arguments:

0 commit comments

Comments
 (0)