Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5k views
in Java FTP by (600 points)
I've just started looking through the updates from 1.03 to 1.1.0 and the first thing that tripped up my test programs was the debugging. How do you go about imitating what was included in the old "debugResponses()" method.

Thanks,
Steve

1 Answer

0 votes
by
We didn't really like debugResponses(), and so have modelled the logging system on log4j.

Take a look at the examples directories in the 1.1.0 distribution for something more detailed, but essentially you can control the level of debug by using Logger.setLevel().

To turn all log statements off use:

Logger.setLevel(Level.OFF)

at the beginning of your application.

To turn on INFO level

Logger.setLevel(Level.INFO);

etc.

To direct logging to a file, use

Logger.addAppender(new FileAppender(filename));

PLEASE NOTE ALSO that the API has changed slightly. After constructing an instance of SSLFTPClient, you need to call the connect() method before performing any operations. Again, take a look at the examples. If you don't call connect() you'll get an exception telling you so.

These changes are a tad annoying, but the logging capabiliites are now far richer, and connect() allows us to support FTPS in implicit mode.

I've just started looking through the updates from 1.03 to 1.1.0 and the first thing that tripped up my test programs was the debugging. How do you go about imitating what was included in the old "debugResponses()" method.

Thanks,
Steve

Categories

...