My Log4j2, Note i tried using XMLLayout and SerializedLayout but neither show logs in LogMX
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="DEBUG" >
<Appenders>
<RollingFile name="server" fileName="${sys:logPath}\fp-server.log" filePattern="${sys:logPath}\fp-server.log.%i" append="true" immediateFlush="true">
<PatternLayout><pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{10} - %msg%n</pattern></PatternLayout>
<XMLLayout />
<Policies>
<SizeBasedTriggeringPolicy size="10 MB" />
</Policies>
<DefaultRolloverStrategy max="20" fileIndex="min"/>
</RollingFile>
<Socket name="socketTest" host="localhost" protocol="tcp" port="4560" immediateFlush="true">
<XMLLayout />
</Socket>
<Console name="STDOUT" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="STDOUT"/>
<AppenderRef ref="server"/>
<AppenderRef ref="socketTest"/>
</Root>
</Loggers>
</Configuration>
1. Copied log4j-api-2.11.2.jar, log4j-1.2-api-2.11.2.jar, and log4j-core-2.11.2.jar to LogMX_v7.8.0_eval\lib
Created log parser using Wizard:
1. Selected Received on a local TCP/UPD port
2. Selected Log4j / Logback
3. Selected Log4j XML format
4. Clicked Finish
5. Enter port 4560 - matched my log4j2.xml file
Log4j2 Debugging:
83 DEBUG Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.SocketAppender].
83 DEBUG SocketAppender$Builder(advertise="null", connectTimeoutMillis="null", host="localhost", immediateFail="null", port="4560", protocol="TCP", reconnectDelayMillis="null", SocketOptions=null, SslConfiguration=null, bufferedIo="null", bufferSize="null", immediateFlush="true", ignoreExceptions="null", XMLLayout(org.apache.logging.log4j.core.layout.XMLLayout@7d27517c), name="socketTest", Configuration(C:\Users\alfstglo\log4j2.xml), Filter=null, ={})
Creating socket localhost:4560
DEBUG Starting TcpSocketManager TCP:localhost:4560
DEBUG createAppenderRef(ref="socketTest", level="null", Filter=null)
DEBUG createLogger(additivity="true", level="DEBUG", name="bls.security.jbossAuthenticator.NMLoginModule", includeLocation="null", ={bls, socketTest}, ={}, Configuration(C:\Users\alfstglo\log4j2.xml), Filter=null)
Nothing at all is shown in LogMX. Status is always "(no new entry, for [time])'
Any ideas? Using notepad++ to sort out logs is getting old.