Estoy tratando de convertir mi log4j.properties en log4j.xml porque necesito usar parte de la función de filtro. Me estoy poniendo un montón de advertencia cuando inicio la aplicación, no estoy muy seguro de cómo resolverlos:log4j mensaje de advertencia durante el uso de log4j.xml
log4j:WARN Continuable parsing error 4 and column 69
log4j:WARN Attribute "threshold" for element type "log4j:configuration" has a default value and must be specified in a standalone document.
log4j:WARN Continuable parsing error 4 and column 69
log4j:WARN Attribute "debug" for element type "log4j:configuration" has a default value and must be specified in a standalone document.
log4j:WARN Continuable parsing error 4 and column 69
log4j:WARN Attribute "reset" for element type "log4j:configuration" has a default value and must be specified in a standalone document.
log4j:WARN Continuable parsing error 20 and column 23
log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".
log4j:WARN Unrecognized element param
sólo estoy tratando con un archivo log4j.xml muy simple, así:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="A1" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p | %d{MM-dd-yyyy HH:mm:ss.SSS} | %t | %c(%L) - %m%n"/>
</layout>
</appender>
<root>
<priority value="INFO"/>
<appender-ref ref="A1"/>
</root>
</log4j:configuration>
¿hay algo que eché de menos aquí? ¡Gracias!
Parece que quitar el atributo standalone = "yes" de la parte superior resuelve el problema. entonces mi pregunta será, ¿qué hace exactamente ese atributo independiente? – fei