Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Email find first error in logs #979
This improves upon the previously existing logic to show the bottom few lines of a file when sending the task complete email.
If no error is found in the logs (which would happen if the task is killed by singularity, for example, or if it completed successfully) then the bottom of the log file is shown instead.
The motivation for choosing "ERROR" as the default regex is that in many common Java logging schemes, logging at the error level will produce a line starting with "ERROR". It is probably best to keep the regex as simple as possible to avoid situations where the word error or exception is logged for some expected reason (eg. "Set up exception handling"), then found instead of an actual error. Therefore using "ERROR" will catch as many errors as possible without catching too many things that aren't errors.