ActiveFileName is not recognized in DXP 7.4


  • ActiveFileName attribute is not recognized when migrating a custom portal-log4j-ext.xml from DXP 7.2 to DXP 7.4.


  • DXP 7.4


  • DXP 7.4 uses Log4j 2 whereas DXP 7.2 uses Log4j 1.  While DXP 7.4 has a compatibility layer that allows Log4j 1 configurations to still be usable, this compatibility layer does not have handling for ActiveFileName.
  • It would be recommended to migrate the Log4j 1 configuration to new Log4j 2 configuration format.
  • The Log4j 2 equivalent for ActiveFileName attribute would be the FileName attribute for RollingFileAppender
  • Please feel free to refer to the following Log4j 2 sample below:
    POC: portal-log4j-ext.xml
    <?xml version="1.0"?>
    <Configuration strict="true">
    		<Appender fileName="@liferay.home@/tomcat-9.0.71/logs/authutil.log" filePattern="@liferay.home@/tomcat-9.0.71/logs/authutil.log.%d{yyyy-MM-dd-HH}" name="AUTHUTILAPPR" type="RollingFile">
    			<Layout pattern="[%t] %d{DATE} %5p %C{1}:%L - %m%n" type="PatternLayout" />
    			<TimeBasedTriggeringPolicy />
    		<Logger name="AUTHUTIL" level="ALL">
    	      <AppenderRef ref="AUTHUTILAPPR"/>

Additional Information

Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0