Menu

Logger system for sample codes

sandy
2010-12-13
2012-12-14
  • sandy

    sandy - 2010-12-13

    Hi can i use existing logger system Upnpprintf() statements in sample codes. If possible can u suggest me how to use that

     
  • Marcelo Roberto Jimenez

    Yes. Include "upnpdebug.h" and take a look at the documentation for the function in this file. Also grep for UpnpPrintf and look at the many usage examples along the source code. It is something along these lines:

    UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__, "Format string %d, %s", i, str);

    Regards,
    Marcelo.

     
  • sandy

    sandy - 2010-12-14

    Hi Marcelo,
                         Yeah have tried that too
    First while configuring have enabled debug using -enable-debug
    Then in sample have added header file of upnpdebug.h
    Next i gave my print statements same as you mentioned but was surprised that i dint find any of my print statements.
    I thought that Upnp levels are going wrong so even i hardcoded the values as 1 but still no use
    Can i know what may be the reason for this

    Regards,
    Sandy

     
  • Marcelo Roberto Jimenez

    Hi Sandy,

    You do realize that the printfs go to the files IUpnpErrFile.txt and IUpnpInfoFile.txt, right?

    If you just enable debugging, you should get these files in the application running directory. Watch out because the file IUpnpInfoFile.txt tends to grow large very quickly.

    Regards,
    Marcelo.

     
  • sandy

    sandy - 2010-12-14

    Hi Marcelo,
                         Yeah i realised that i was looking for my print statements in IUpnpInfoFile.txt file only and its wright that its creating file in application running directory. But still i dont find any of my print statements.

    >Watch out because the file IUpnpInfoFile.txt tends to grow large very quickly.

    Yeah its growing larger and its appending continuously but it should not be reason for not getting my print statements wright…