Debug Method (FTP)


10.2, PLBCMP GUI Only

 

The Debug method controls FTP client logging as commands are executed. The FTP client logging can be turned on before a FTP connection is established. This method uses the following format:

 

[label]

{object}.Debug

[GIVING {return}][ using [*LogFile=]{logfile}:

 

 

[*Level=]{level},[*Flags=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A FTP that has been declared.

return

Optional. A Numeric Variable that returns the pass or failure values for the execution of the method.

logfile

Optional. A Character String Variable or string literal that specifies the local file name used for logging FTP command operations.

level

Optional. A Numeric Variable or decimal number that specifies how much debug data to log.

flags

Optional. A Numeric Variable or decimal number that specifies a bit mask value that can control the behaviors of this method.

Flags Affected: OVER, ZERO

Note the following:

  1. If the FTP 'debug' method 'LogFile' option is not specified in the method, the method operation is determined strictly based on the 'FLAG' settings and whether there is a currently opened logfile or not:

  2.  

    Logfile

    Flags

    Operation Performed

    Yes

    Any

    Previously opened logfile is closed.

    Yes

    0x0

    Open/Create logfile in overwrite mode.

    Yes

    0x1

    Open/Create logfile in append mode.

    No

    Any

    Level setting changed if specified.

    No

    0x0

    Method is ignored.

    No

    0x1

    Method is ignored.

    No

    0x2

    Flush data for previously opened logfile.

     

  3. The ZERO flag is set if the {return} value is zero which indicates that the method executed successfully.

  4. The OVER flag is set if the {return} Numeric variable is too small to receive the pass or fail value without being truncated.

  5. The {level} value can be set to control how much data is logged. The logging levels are described as follows:

  6.  

    Log Level

    Description

    0

    Log only errors. (default)

    1

    Log only errors.

    2

    Log errors and actions.

    3

    Log all available data.

     

  7. The {flags} values are defined as follows:

  8.  

    Values

    Description

    0x0

    Open/Create log file to overwrite any existing log file data.

    0x1

    Open log file to append data to the end of an existing log file.

    0x2

    Flush current opened log file.

    0x4

    Close current log file.

 

 

See Also: FTP Control Methods, Method Syntax



PL/B Language Reference Connect Method (FTP) Delete Method (FTP)