rschmitt opened a new issue, #213:
URL: https://github.com/apache/logging-log4j-transform/issues/213

   Converting [this 
file](https://github.com/apache/logging-log4j2/blob/2.x/log4j-core-test/src/test/resources/log4j-rolling.properties)
 from `v1:properties` to `v2:xml` produces invalid configuration:
   
   ```shell
   $ java -jar ~/Downloads/log4j-transform-cli.jar config-file convert -i 
v2:properties -o v2:xml 
log4j-core-test/src/test/resources/log4j-rolling.properties output.xml
   ```
   
   ```xml
   <?xml version="1.0" ?>
   <Configuration xmlns="https://logging.apache.org/xml/ns"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-config-2.xsd"; 
name="PropertiesConfigTest" status="error">
     <Properties>
       <Property name="filename" value="target/rolling/rollingtest.log"/>
     </Properties>
     <ThresholdFilter level="debug"/>
     <Appenders>
       <Console name="STDOUT">
         <PatternLayout pattern="%m%n"/>
       </Console>
       <RollingFile fileName="${filename}" 
filePattern="target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz" 
name="RollingFile">
         <Policies>
           <TimeBasedTriggeringPolicy interval="2" modulate="true"/>
           <SizeBasedTriggeringPolicy size="100MB"/>
         </Policies>
         <PatternLayout pattern="%d %p %C{1.} [%t] %m%n"/>
       </RollingFile>
       <List filters="threshold" name="List">
         <ThresholdFilter level="error"/>
       </List>
     </Appenders>
     <Loggers>
       <Root appenderRefs="stdout" level="info">
         <AppenderRef ref="STDOUT"/>
       </Root>
       <Logger additivity="false" appenderRefs="rolling" level="debug" 
name="org.apache.logging.log4j.core.appender.rolling">
         <AppenderRef ref="RollingFile"/>
       </Logger>
     </Loggers>
   </Configuration>
   ```
   
   This results in a runtime warning:
   
   ```
       [junit] 2025-08-04T21:49:33.638Z main ERROR Root contains an invalid 
element or attribute "appenderRefs"
   ```
   
   I assume that `rootLogger.appenderRefs=...` is valid Log4j2 properties 
config syntax, since it appears in Log4j2's test corpus as well as various 
Google search results 
([example](https://coderanch.com/t/785028/java/log-creating-logging-file-console)).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to