(#19379) Clarify documentation for exec logoutput

Re-wording to address two issues:

  - Explicitly state that logging the exit code is different from the logging
    the output and that this always happens.

  - Fix incorrect statement that `on_failure` triggers for non-zero exit codes.
    `on_failure` triggers when the exit code does not match any value specified
    by `returns`.