Log4j Log Files not getting created in Container

I have a Java Hello World application that uses log4j2. Upon running the application it creates the log files in the logs folder and writes debug statements into the log file.

However when I create a Docker Image and run, though I see the logs folder getting created inside the container, I don’t see the log files getting created.

I am clueless. Any pointers, please? Any help appreciated.

Thanks
Ganesh