Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
22.7k views
in Java FTP by
Why cant I turn logging off

tried with cmd : Logger.setLevel(Level.OFF)

but still gets this to console:
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 23 jun 2004 17:38:18.546 : 220 Blue Coat Ftp Service.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 23 jun 2004 17:38:18.546 : ---> USER username
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 23 jun 2004 17:38:29.311 : 331 Password required for username.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 23 jun 2004 17:38:29.311 : ---> PASS ********
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 23 jun 2004 17:38:29.581 : 230 User username logged in.
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 23 jun 2004 17:38:29.581 : ---> PASV



any ideas?

16 Answers

0 votes
by (161k points)
Can you post a bit more code showing where you set the level etc?

Why cant I turn logging off

tried with cmd : Logger.setLevel(Level.OFF)

but still gets this to console
any ideas?
0 votes
by
Can you post a bit more code showing where you set the level etc?

Why cant I turn logging off

tried with cmd : Logger.setLevel(Level.OFF)

but still gets this to console
any ideas?


I tried it first, and in the middle....
...but nothing happened :(
0 votes
by
Can you post a bit more code showing where you set the level etc?

Why cant I turn logging off

tried with cmd : Logger.setLevel(Level.OFF)

but still gets this to console
any ideas?


I even tried 'debugResponses(true | false) '
0 votes
by (161k points)
Are you calling Logger.setLevel(Level.OFF) before you construct the FTPClient object?

Can you post a bit more code showing where you set the level etc?

Why cant I turn logging off

tried with cmd : Logger.setLevel(Level.OFF)

but still gets this to console
any ideas?


I even tried 'debugResponses(true | false) '
0 votes
by
I've tried both.



Are you calling Logger.setLevel(Level.OFF) before you construct the FTPClient object?

Can you post a bit more code showing where you set the level etc?

Why cant I turn logging off

tried with cmd : Logger.setLevel(Level.OFF)

but still gets this to console
any ideas?


I even tried 'debugResponses(true | false) '
0 votes
by (161k points)
Are you using the log4j integration feature?

I'm afraid we can't help you much further if you don't post a simple program that illustrates the problem.
0 votes
by
import com.enterprisedt.net.ftp.*;
import com.enterprisedt.util.debug.*;

public class FtpTest {

public static void main(String args[]) {
new FtpTest();
}

public FtpTest() {
Logger.setLevel(Level.OFF);
FTPClient ftp = null;
Logger.setLevel(Level.OFF);

String host = "some.host.com";
String user = "user";
String pwd = "pwd";
try {
ftp = new FTPClient(host);
ftp.login(user, pwd);
ftp.setType(FTPTransferType.BINARY);

String[] files = ftp.dir();
for (int i = 0; i < files.length; i++)
System.out.println(files[i]);

ftp.quit();

} catch (Exception e) {
System.out.println("ERROR: '" + e + "'");
}
}

} // End class


Are you using the log4j integration feature?

I'm afraid we can't help you much further if you don't post a simple program that illustrates the problem.
0 votes
by
and im using 1.4.0
0 votes
by (161k points)
It's a bug - sorry about that. We'll get a fix out ASAP.

I think a quick hack to turn off logging should be to Logger.setLevel(Level.FATAL);
0 votes
by
ok, thanks for your quick replies!!!

...and thanks for a great ftpclient!

It's a bug - sorry about that. We'll get a fix out ASAP.

I think a quick hack to turn off logging should be to Logger.setLevel(Level.FATAL);

Categories

...