The function FTP_logging currently only affects everything after the login.
The function FTP_logging() ist already prepared to set the logging level (wkSession.wkDebug) for the default session.
It's just not working because the function cmd_resetSession re-initialize the structure wkSession with "reset".
With the following small change the call of
Code: Select all
FTP_Logging(-1: myDftValue)
(inserted Rows are marked with "M1")
Code: Select all
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Reset session data structures.
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
P cmd_resetSession...
P B
...
M1 D bufDebug S like(wkDebug)
* Save default session active-flag and socket descriptor
B01 c if wkSocket = DFT_SESSION
...
M1 c eval bufDebug = wkDebug
X01 c else
...
E01 c endif
c reset wkSession
....
* Retain default session active-flag and socket descriptor
B01 c if isDftSession = *ON
...
M1 c eval wkDebug = bufDebug
E01 c endif
c return
P E