logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilfong, Paul" <paul.wilf...@ngc.com>
Subject Log4j XMLSocketReceiver plugin problem
Date Wed, 19 Sep 2007 00:00:34 GMT
I am migrating from log4j 1.3 to 1.2.15, trying to execute the
SimpleSocketReceiver with the XMLSocketReceiver as a plugin, and am
getting an "Unrecognized element" warning.

The following is the output to the Command Window...
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j:WARN Unrecognized element plugin
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [org.apache] additivity to [true].
log4j: Level value for org.apache is  [INFO].
log4j: org.apache level set to INFO
log4j: Level value for root is  [ALL].
log4j: root level set to ALL
log4j: Class name: [org.apache.log4j.RollingFileAppender]
log4j: Setting property [append] to [false].
log4j: Setting property [file] to [C:/ttt/test.log].
log4j: Setting property [maxFileSize] to [50KB].
log4j: Setting property [maxBackupIndex] to [5].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p
[%c{1}] %m%n].
log4j: setFile called: C:/ttt/test.log, false
log4j: setFile ended
log4j: Adding appender named [RF] to category [root].
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Parsing layout of class: "org.apache.log4j.TTCCLayout"
log4j: Adding appender named [CONSOLE1] to category [root].
[main] INFO org.apache.log4j.net.SimpleSocketServer - Listening on port
[main] INFO org.apache.log4j.net.SimpleSocketServer - Waiting to accept
a new cl

Here is the properties file I use for the SimpleSocketReceiver...
<!-- log4jproperies.xml
     Setup for the SimpleSocketServer, with the XMLSocketReceiver to
help bring in log4cxx messages.

<!DOCTYPE log4j:configuration SYSTEM 'log4j.dtd'>

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"

<appender name="RF" class="org.apache.log4j.RollingFileAppender">
	<param name="Append" value="false"/>
	<param name="File" value="C:/ttt/test.log"/>
	<param name="MaxFileSize" value="50KB"/>
	<param name="MaxBackupIndex" value="5"/>
	<layout class="org.apache.log4j.PatternLayout">
		<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%c{1}] %m%n"/>
<appender name="CONSOLE1" class="org.apache.log4j.ConsoleAppender">
	<layout class="org.apache.log4j.TTCCLayout"/>

<plugin name="XMLSocketReceiver"
	<param name="Port" value="7776"/>

<logger name="org.apache">
	<level value="INFO"/>

	<level value="ALL"/>
	<appender-ref ref="RF"/>
	<appender-ref ref="CONSOLE1"/>


And here is the DOS batch file I use to execute the
@echo off
title 2run-1.2.15-SS.bat
java -classpath
org.apache.log4j.net.SimpleSocketServer 7777

I had been able to get this working under 1.3,  with some differences
for 1.2.15.  For example, I reordered the properties file to put logger
before <root>.  Also, I put the companion jars in the classpath on the
execution line in the batch file.  (This is all using JDK jdk1.6.0_02 on
Windows XP 2002.)

Any help with this would be greatly appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message