scope of FTP_logging(DFT_SESSION: ...)

Discussions related to FTPAPI (An FTP client package for RPG programming.) http://www.scottklement.com/ftpapi/
Post Reply
FelixMaussner
Posts: 1
Joined: Tue Apr 26, 2022 8:02 am

scope of FTP_logging(DFT_SESSION: ...)

Post by FelixMaussner »

In some cases we are getting too much logging information in the joblog.
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)
will set the log-level for new sessions to 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  
Post Reply