Need a way to echo something in a container should reflect in the host path /var/lib/docker/con.../id._json.log

I am trying here the fluentd logging to get all container logs and parsed.

I am looking the same format json logs at container directory.

{log:" …",“stream”:“stdout”,“time”:“some time”}

To test against different pattern of logs in fluentd parser . I need something like

I get into the container and echo " something ", i expect those logs should present to the /var/lib/docker/container…/json.log

I tried echo " " 1> /dev/null
echo " something" > /dev/stdout

There is no way to echo something inside the container will reflect in the host path /var/lib/docker/conatiner/*

Is there any way to achieve thiis.

use docker file and while building u can mount the volume or type inside the docker file echo " " >> docker/path/where/u/want