log4j错误消息在执行期间显示在控制台中

时间:2019-09-05 08:30:15

标签: selenium log4j

在执行期间,控制台中会显示以下log4j错误。必须对以下代码进行哪些更改?请提出建议。

log4j:ERROR Parsing error on line 2 and column 30
log4j:ERROR Document root element "Configuration", must match DOCTYPE root "null".
log4j:ERROR Parsing error on line 2 and column 30
log4j:ERROR Document is invalid: no grammar found.
log4j:ERROR DOM element is - not a <log4j:configuration> element.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
	<Properties>
		<Property name="basePath">./logs</Property>
	</Properties>

	<Appenders>
		<RollingFile name="File" fileName="${basePath}/prints.log" filePattern="${basePath}/prints-%d{yyyy-MM-dd}.log">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
			<SizeBasedTriggeringPolicy size="20000" />
		</RollingFile>
		<Console name="Console" target="SYSTEM_OUT">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
		</Console>
	</Appenders>
	<Loggers>
		<Root level="trace">
			<AppenderRef ref="File" />
			<AppenderRef ref="Console" />
		</Root>
	</Loggers>
</Configuration>

0 个答案:

没有答案