Collect and store logs from `nomad alloc exec`

Hello! Our engineers use the nomad alloc exec command in order to gain shell access to our running services. For example, engineers uses exec to fix data issues while resolving a support request. Is it possible to collect and store the logs (stdout) that are generated during the nomad alloc exec session? If the engineer makes a mistake, having a log of what was run can be very helpful.

What would you recommend?

Thanks!