Log4j2.xml not writing logs into the logfile.log
I have a log4j2.xml and when I complete executing selenium TC, the logfile.log gets created with 0 bytes. Tried changing the content on log4j2.xml but not successful. Does anyone has any idea what is wrong?
Find below the content in log4j2.xml
If I use below content then it gives 'main ERROR Unknown object "root" of type org.apache.logging.log4j.core.config.LoggerConfig is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts", "CustomLevels"].' error
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="fileAppender"
class="org.apache.log4j.FileAppender">
<param name="Threshold" value="INFO" />
<param name="File" value="logfile.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c{1}] %m %n" />
</layout>
</appender>
<root>
<level value="INFO" />
<appender-ref ref="fileAppender" />
</root>
</log4j:configuration>
请先登录再写评论。
This is AppCode's forum, please contact TeamCity support: https://teamcity-support.jetbrains.com/hc/en-us/community/topics