Sto provando a convertire il mio log4j.properties in log4j.xml perché ho bisogno di utilizzare alcune delle funzionalità del filtro. mi sto un po 'di allarme quando inizio l'applicazione, io non sono esattamente sicuro di come risolverli:messaggio di avviso log4j durante l'utilizzo di 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
Sto solo cercando con un semplice file log4j.xml così:
<?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>
c'è qualcosa che ho perso qui? Grazie!
sembra voler eliminare l'attributo standalone = "yes" dall'alto risolvere il problema. allora la mia domanda sarà, che cosa fa esattamente questo attributo standalone? – fei