Changing the log file

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
jonboy49
Posts: 206
Joined: Wed Jul 28, 2021 8:18 pm

Changing the log file

Post by jonboy49 »

We have experienced some random weirdness when using Zoom APIs recently. As a result, I am logging everything as I can't predict when/what will cause a problem.

Of course, the log files get huge and I would like to switch them at least daily. I have modified my code to specify a different log file name each day, but it doesn't seem to affect the file usage. The only way I have found so far to change the file in use is to cycle the server.

I'm sure I'm missing something really simple and that there is a way to do that but ...

Has anyone else dealt with this?
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: Changing the log file

Post by Scott Klement »

What do you mean by log files? Do you mean the http_debug log from HTTPAPI?

You should be able to call http_debug(*ON: filename); Then when you want to change the name, call http_debug(*off) and http_debug(*on: newfilename);

But you also mention cycling a server, and HTTPAPI doesn't have servers... so I'm not sure I understand what you're talking about.
jonboy49
Posts: 206
Joined: Wed Jul 28, 2021 8:18 pm

Re: Changing the log file

Post by jonboy49 »

Thanks, Scott - yes I meant the debug file and for some reason it did not occur to me to turn it off before changing the name. I plead senility and just too many things going on in my life!

I can understand your confusion re cycling the server. The HTTPAPIs are called from a web server job and I thought that cycling the server should cause the reset. On reflection the HTTPAPI code is probably called via an SQL function so the HTTPAPI service program is probably not running in the Apache jobs.

Anyway off and on with luck will give me what I need.

Thanks
Post Reply