You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Adams Christian <ch...@comlet.de> on 2006/10/16 10:50:30 UTC

Re: Which effort would it be to make SocketAppender run?

 
Hi,

I work with the current SVN HEAD from http://svn.apache.org/repos/asf/logging/log4cxx/trunk. I tried to get the socketappender to run. The connection was established but no data was transfered. I found in the socketINPUTstream.cpp the following code and thought that is the reason why it does not work. If you say thats not the reason I have to search again :-)

Thanks for your help

Christian

void SocketInputStream::read(LogString& /* value */) const
{
   LogString::size_type size = 0;

   read(&size, sizeof(LogString::size_type));
// LOGLOG_DEBUG(_T("string size read:") << size);

   if (size > 0)
   {
      if (size > 1024)
      {
         throw SocketMessageTooLargeException();
      }

#if 0
      logchar * buffer;
//    buffer = (logchar *)alloca((size + 1)* sizeof(logchar));
      buffer[size] = LOG4CXX_STR('\0');
      read(buffer, size * sizeof(logchar));
      value = buffer;
#else
        //
        //  TODO: not impl
        //
        assert(false);
#endif
   }

// LOGLOG_DEBUG(_T("string read:") << value);
}

-----Ursprüngliche Nachricht-----
Von: Andreas Fester [mailto:afester@apache.org] 
Gesendet: Donnerstag, 14. September 2006 22:16
An: Log4CXX Dev
Betreff: Re: Which effort would it be to make SocketAppender run?

Hi,

which code do you actually refer to? In the current SVN HEAD, the socketappender.cpp and socketoutputstream.cpp do not contain any disabled code (only some debug output is commented out).
Note that there is also a daily dist-tarball available at http://littletux.homelinux.org/log4cxx/

Best Regards,

	Andreas

Adams Christian wrote:
> > Hello,
> >
> > I use log4cxx and now would like to use the SocketAppender. But I 
> > found that some code is commented out or disabled with #if 0 ... #endif.
> > Also I found that the reason for this is the change from hard coded 
> > char to logchar which could be char or wchar_t.
> > Also I found that mainly socketinputstream.cpp has to be fixed to 
> > get socketappender runing. Is that correct?




Re: Which effort would it be to make SocketAppender run?

Posted by Andreas Fester <af...@apache.org>.
Hi Christian,

thats why I asked ;-)
The socketappender uses the socketOUTPUTstream to write data, and this class
should work.
Can you provide a minimal code sample of what you are trying to do and
which shows the issue?

Regards,

	Andreas

Adams Christian wrote:
> 
> Hi,
> 
> I work with the current SVN HEAD from http://svn.apache.org/repos/asf/logging/log4cxx/trunk. I
> tried to get the socketappender to run. The connection was established but no data was
> transfered. I found in the socketINPUTstream.cpp the following code and thought that is the
> reason why it does not work. If you say thats not the reason I have to search again :-)
> 
> Thanks for your help
> 
> Christian
[...]