[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Change Debug File Name



Paul,

I had some time "to kill" late this afternoon and looked at the exact syntax. Check HTTPAPI_H or the example programs first when you wonder how or what to do in HTTPAPI. If you look at http_debug procedure.

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
* http_debug():  Turn debugging info *ON or *OFF                     
*                                                                    
*      peStatus = (input) status (either *ON or *OFF)                
*                                                                    
*    peFilename = (input/optional) filename that debug info will be  
*                    written to.  If not defined, the value from     
*                    CONFIG_H is used.                               
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The syntax in built in to the procedure to change the file. As you can see, the filename can be passed in as a parameter. So you can make up a static name for your particular application or make it dynamic based on other information. This is illustrated in a couple of the current (beta) examples and probably in several of the released versions as well:

http_debug(*on: '/tmp/example13-debug.txt');

Scott also has it listed on the beta page:
http://www.scottklement.com/httpapi/beta/

If you are interested in having different file names but don't really care what they are called, try using 
http_tempfile()
This will generate a "unique" name for you to use as temporary holding file. It is used in a couple of the example programs to provide places to hold XML files either on upload or download, but could give you a name for the debug file as well. This article talks a little bit more about the underlying program and how this code could be implemented without using http_tempfile().
http://systeminetwork.com/node/60979

Trying to change HTTP_DEBUG_FILE was resourceful. It appears to be a standalone variable, but it is buried in the service program. The version you changed is the variable in YOUR procedure/program. Not the same variable! 

Mike Krebs





> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Paul Morton
> Sent: Friday, June 25, 2010 12:23 PM
> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Change Debug File Name
> 
> I'm using http_post_xml.  Is it possible to change the debug file name
> from httpapi_debug.txt to something more like debug_paulsApp.txt.
> 
> I was hoping this was a string that could be manipulated.
> 
> I tried setting HTTP_DEBUG_FILE to a different value but I suspect that
> is compiled in the API, as it did not appear change where the output
> goes.
> 
> 
> Paul Morton
> 
> 
> 
> 

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------