ADAH-EviDENce / NewsReader

Docker build of full NewsReader pipeline in Dutch.
Apache License 2.0
2 stars 4 forks source link

Error logging for bash script #30

Closed wmkouw closed 6 years ago

wmkouw commented 6 years ago

Goal: whenever one of the modules fails, the bash script should exit and write the error to a module-specific log-file.

wmkouw commented 6 years ago

Implemented in commit 8970e66.

At the moment, the script performs the following actions for each module:

Note: some of the modules don't have runtime stdout; I'm thinking of making logging optional.

wmkouw commented 6 years ago

Problem: some modules push their error messages to stdout instead of sterr.

wmkouw commented 6 years ago

New setup for error handling:

Both progress reporting and errors are sent to a .log file. If the exit status of the module is 0, then delete the log file, rename the temporary .naf output file and proceed.

If the exit status is not 0, then report the contents and name of the .log file and exit with code 1 to 13 for each module.