Local customizations/licenses are kept outside of the webapp. For example:
$TOMCAT_HOME/shared/classes/alfresco/extension/...-log4j2.properties
Shipping config files should be located within the webapp. For example:
WEB-INF/classes/alfresco/extension/...-log4j2.properties
A dev-log4j2.properties file should never be used in an ongoing during production, nor packaged as a part of any product.