Configure apache to log exit code

When apachectl exits with an error (rare, but it happens), is there a way to configure apache to log the exit code it exited with? I need this for debugging docker containers that run apache - the container will exit when apache exits and I need to know why.

ENTRYPOINT ["apachectl"]

the above is my current apache configuration - is there a flag I can use to tell apache to log the exit code, or at least log something like:

apache exiting with code: 12