Location of Logfiles

I can not find any logfiles. Is there any way to enable logs on the different containers and save them on a share?

Did I miss an obvious documentation element?

Regards
Hagen

Hi Hagen,

you can get the list of active containers by calling “docker ps” and for the desired container ID retrieve its logs via “docker logs --tail 50 [container ID]”. Tail parameter is optional. In order to e.g. retrieve all jvb logs into a file, you can just run a single command: docker logs “$(docker ps | grep jvb | cut -c 1-12)” > jvb.log

KR,
Michal

Hello,
hello @Michal_Polacik,

is there a way to mount the logfiles to the Docker host?

Thanks!

Hi @BrownGreenman,

honestly I don’t know. I’ve used the approach described in my previous comment. Basically just copy-pasted to the host console the following lines to collect logs from 3 containers named jvb, jicofo and prosody in separate log files:

docker logs “(docker ps | grep jvb | cut -c 1-12)" > jvb.log docker logs "(docker ps | grep jicofo | cut -c 1-12)” > jicofo.log
docker logs “$(docker ps | grep prosody | cut -c 1-12)” > prosody.log

1 Like