Well, including the xml files would be nice, now wouldn't it...:-) > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 11:20 PM > To: Log4J Developers List > Subject: Plugin changes > > > I am going to write some PluginRegistry test cases tomorrow, but > the basics > appear to be working well enough. > > Enclosed are some xml files that can demonstrate the use of the plugin > o.a.log4j.net.SocketReceiver. source.xml is for configuring the > source (our > old friend SocketAppender) and sink.xml is for configuring the > sink (our new > friend SocketReceiver). > > It should be obvious that it would be extremely trivial to create the > equivalent of o.a.log4j.net.SocketServer just by creating a simple main() > that just configured log4j using sink.xml. AND you could use the > exact same > code to receive events on multiple sockets just by updating the > sink.xml to > define more SocketReceiver plugins. AND you could use the exact same code > to receive events via SocketReceiver plugins and other from other sources > like JMS using the JMSReceiver. In fact, you could configure sink.xml to > receive events from both types of sources simultaneously just by defining > the proper plugin descriptions in sink.xml. > > This now makes configuring log4j to receive external/remote > events extremely > simple, given that an appropriate receiver plugin has been written. > SocketServer and JMSSink are eventually obsoleted. Wiring clients like > Chainsaw and LF5 to receive events from other sources than SocketAppender > becomes possible and fairly trivial. > > More work, review and test cases are needed, but the basics are now there. > Comments welcome. > > -Mark > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"> <appender name="socketout" class="org.apache.log4j.net.SocketAppender"> <param name="RemoteHost" value="localhost"/> <param name="Port" value="5000"/> <param name="ReconnectionDelay" value="500"/> </appender> <root> <level value="debug"/> <appender-ref ref="socketout" /> </root> </log4j:configuration>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"> <!-- <appender name="stdout" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{ABSOLUTE} %c{1}: %m%n"/> </layout> </appender> --> <appender name="A1" class="org.apache.log4j.FileAppender"> <param name="File" value="output/filters.PluginsTest.txt" /> <param name="Append" value="false" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{ABSOLUTE} %c: %m%n"/> </layout> </appender> <plugin name="SocketReceiver" class="org.apache.log4j.net.SocketReceiver"> <param name="Port" value="5000"/> </plugin> <root> <level value="debug"/> <appender-ref ref="A1" /> </root> </log4j:configuration>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>