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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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…
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi can i use existing logger system Upnpprintf() statements in sample codes. If possible can u suggest me how to use that
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.
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
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.
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…