How to have the docker container logs on the host machine

Where the docker container console logs are stored. And how can I have the console logs of docker container stored on my host?

I tried below to get the log location. This pointed me to file at /var/lib/docker/containers/ But I dont find any directory called as docker at /var/lib inside the docker container

docker inspect --format='{{.LogPath}}' <container id>

I want to collect the logs which we get from docker logs <containerid> to have/mount it to my host.

Source: StackOverflow