[ https://issues.apache.org/jira/browse/LOG4J2-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15455984#comment-15455984 ]
Gary Gregory commented on LOG4J2-1528: -------------------------------------- No: {noformat} java.lang.AssertionError: Expected: Expected text value ' ' but was ' ' - comparing <Configuration ...> </Configuration> at /Configuration[1]/text()[1] to <Configuration ...> </Configuration> at /Configuration[1]/text()[1]: <Configuration name="config name" packages="foo,bar" status="ERROR"> <Properties> <Property name="MyKey">MyValue</Property> </Properties> <Scripts> <ScriptFile isWatched="true" name="target/test-classes/scripts/filter.groovy" path="target/test-classes/scripts/filter.groovy"/> </Scripts> <CustomLevels> <CustomLevel intLevel="17" name="Panic"/> </CustomLevels> <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMisMatch="NEUTRAL"/> <Appenders> <CONSOLE name="Stdout" target="SYSTEM_OUT"> <PatternLayout pattern="%d [%t] %-5level: %msg%n%throwable"/> <MarkerFilter marker="FLOW" onMatch="DENY" onMisMatch="NEUTRAL"/> </CONSOLE> </Appenders> <Loggers> <Logger additivity="false" includeLocation="true" level="DEBUG" name="org.apache.logging.log4j"> <AppenderRef ref="Stdout"/> </Logger> <Root level="ERROR"> <AppenderRef ref="Stdout"/> </Root> </Loggers> </Configuration> but: result was: <Configuration name="config name" packages="foo,bar" status="ERROR"> <Properties> <Property name="MyKey">MyValue</Property> </Properties> <Scripts> <ScriptFile isWatched="true" name="target/test-classes/scripts/filter.groovy" path="target/test-classes/scripts/filter.groovy"/> </Scripts> <CustomLevels> <CustomLevel intLevel="17" name="Panic"/> </CustomLevels> <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMisMatch="NEUTRAL"/> <Appenders> <CONSOLE name="Stdout" target="SYSTEM_OUT"> <PatternLayout pattern="%d [%t] %-5level: %msg%n%throwable"/> <MarkerFilter marker="FLOW" onMatch="DENY" onMisMatch="NEUTRAL"/> </CONSOLE> </Appenders> <Loggers> <Logger additivity="false" includeLocation="true" level="DEBUG" name="org.apache.logging.log4j"> <AppenderRef ref="Stdout"/> </Logger> <Root level="ERROR"> <AppenderRef ref="Stdout"/> </Root> </Loggers> </Configuration> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.junit.Assert.assertThat(Assert.java:956) at org.junit.Assert.assertThat(Assert.java:923) at org.apache.logging.log4j.core.config.builder.ConfigurationBuilderTest.testXmlConstructing(ConfigurationBuilderTest.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) {noformat} Note the extra char 13s. > Serialize configuration into a log4j2.xml file > ---------------------------------------------- > > Key: LOG4J2-1528 > URL: https://issues.apache.org/jira/browse/LOG4J2-1528 > Project: Log4j 2 > Issue Type: New Feature > Components: Configurators > Affects Versions: 2.6.2 > Reporter: Mikael Ståldal > Assignee: Mikael Ståldal > Fix For: 2.7 > > > This would be useful for e.g. converting from Log4j 1 to Log4j 2 config. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org