[reSIProcate] Trying to get logs working

John Draper lists at webcrunchers.com
Sun Sep 4 06:14:28 CDT 2005


Hi,

Please correct me if I'm wrong,  but when I initialize my application,
to turn on logging with full debugging.... I would do this....

 Log::initialize(Log::Cout, resip::Log::Debug, "SipPhone", "/tmp/siplog");

Would this create a file called "siplog" and place that into my /tmp
directory, with full verbose debugging output?

Also,  my Handlers are not getting called,  but without logging working,
how can I tell?

here is what I do.....

I call my handler "regHandler"

   regHandler = new myRegHandler;   // defined in "Siphandlers" module
   clientDum->setClientRegistrationHandler(regHandler);

that should be it,   right?   but then I also have to do this...

   // start the threads.
   stackthread = new StackThread(*stack);
   stackthread->run();
   dumthread = new DumThread(*clientDum);
   dumthread->run();

I'm not sure whether or not I have to start the threads first before
instantiating my regHandler,  but I assume I would want a handler made
before allowing the thread to call it.

If Log was working then when I call something like this....

   InfoLog ( << "Client::onRequestRetry: " << response );

This above statement would output the logs to the specified file,
right?

why would my Log:: stuff not work?  Can someone please lead me to
some things to try, read, or research?

John



More information about the resiprocate-devel mailing list