Your question seems to be in reference to Log4j 1. Log4j 1 has been end-of-life since August of 2015.
Upgrading to Log4j 2.13.0 would allow you to use the Kubernetes Lookup which would allow you to configure your log file name as:
<File name="MyFile" filename="${path}/app_${k8s:containerName}.${date:MM-dd-yyyy}.log>
<PatternLayout>
<Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
</PatternLayout>
</File>