Stdout logging in Swarm

Any way of specifiying the container path from which to pull the stdout logs into Splunk from Docker Swarm?
Ideally I’d have both container log file.json and Splunk logs.
I’m asking because even though I have the location of container logs, the container id can change anytime:
C:\ProgramData\docker\containers\hash-id-of-container

Before containerization, Splunk forwarder was installed as an app on each server.