Accessing logs from a service defined in a pipeline job

Hi folks
We are building a java/tomcat based web application and for testing the backend, we use a dedicated pipeline where we start the application as a service and use a special testclient based on spock for executing calls to the backend . For analyzing server errors the client logs from the pipeline are not useful, we need the logs from our server running in the service container.

My idea was to configure the service logs to be located on the automatically mounted /builds directory and to attach the logs as build artefact to the job.

This does not seem to work out of the box, when the service is started the /builds/ directory is empty and is emptied again when the job checkouts out the needed repository to /builds/$CI_PROJECT_PATH, so the logfile created by the service tomcat is deleted.
I’ve tried waiting for the /builds/$CI_PROJECT_PATH to be present when the service is started, but this results in a deadlock since the pipeline job waits until the service is started and available.
Any ideas?