As the title of the question states, is it possible to avoid creating parent folders of log4j2 File appender log file if they don't exist?
Actually, when I pass the non-existing parent folder of the file appender log it will be created automatically by log4j2.
I have already tried to see if there is an attribute on the File tag but there is nothing.
https://logging.apache.org/log4j/2.x/manual/appenders.html
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout
pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
<File name="File" fileName="${sys:app.home}/app.log"
ignoreExceptions="false">
<PatternLayout
pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</File>
</Appenders>
fileName="${sys:app.home}/app.log"from above.