logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Does SocketHubAppender fully implemented yet?: msg#00036

apache.logging.log4cxx.user

Subject: Does SocketHubAppender fully implemented yet?

Dear sir/madam:

I'm a newbie of logcxx. When I using log4cxx::net::SocketHubAppender to send log message to clients, I can not receive any log message.At beginning, I connect the SocketHubAppender at port 4561, and netstat reports that there have already established an connection between client and SocketHubAppender. However, there the report of netstat shows that the Send-Q and Recive-Q are empty forever, and the client was blocked when invoking log4cxx::spi::LoggingEvent::read().

I have searched google and found nothing about this. Can you help me? Thanks.

Sincerely,
Sun Xiaoguang.
Oct. 24th, 2004

Here is my client code. Hope you can help me.

#include <log4cxx/helpers/socket.h>
#include <log4cxx/spi/loggingevent.h>
#include <log4cxx/net/socketnode.h>
#include <log4cxx/helpers/thread.h>
#include <log4cxx/logmanager.h>
#include <iostream>

int main(){
log4cxx::helpers::SocketPtr __socket;
log4cxx::spi::LoggingEventPtr __logging_event;
log4cxx::helpers::SocketInputStreamPtr __input_stream;

__socket=new log4cxx::helpers::Socket("192.168.123.244",4561);
__input_stream=__socket->getInputStream();

while(true){
__logging_event->read(__input_stream);
std::cout << __logging_event->getMessage() << std::endl;
};
__socket->close();
}

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo