hello i am using chainsaw to receiv logs from other machines the problems is ; when i try to send logs from a simple application using log4cxx to chainsaw i always get error messages when using a SocketReceiver in chainsaw , i always get this message in the logs Connection lost! :: invalid stream header same problem with XML and Socket receiver but i got other log errors
here is the configuration file of chainsaw <?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="A2" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.SimpleLayout"/> </appender> <plugin name="UDPReceiver" class=" org.apache.log4j.net.UDPReceiver"> <param name="Port" value="4560"/> </plugin > </log4j:configuration> ************************************************************** the small proigram using log4cxx #include <iostream> #include <cstdlib> #include "log4cxx/logger.h" #include "log4cxx/basicconfigurator.h" #include "log4cxx/appender.h" #include "log4cxx/fileappender.h" #include "log4cxx/patternlayout.h" #include <string> using namespace log4cxx; using namespace log4cxx::helpers; using namespace std; LoggerPtr logger(Logger::getLogger("Myapp")); int main(int argc, char **argv[]) { LOG4CXX_WARN(logger,"********************************"); return EXIT_SUCCESS; } ************************************************ the configuration file of log4cxx log4j.rootLogger=DEBUG, A1 log4j.appender.A1=org.apache.log4j.net.SocketAppender log4j.appender.A1.layout=org.apache.log4j.SimpleLayout log4j.appender.A1.remoteHost=ackbar Thank's