We are trying to log to a file with the Logger set to debug but we keep getting an empty file. We are trying to research a problem with using FTPs sending large files to an IBM mainframe. I suspect we need to upgrade our client but I don't know how to get the version information and I assume this info would be in the debug level. I have included a portion of our java code. If you need the entire program I will send it but I was not sure how to attach a file.
package com.egateway.MF;
import com.enterprisedt.net.ftp.FTPTransferType;
import com.enterprisedt.net.ftp.FTPException;
import com.enterprisedt.net.ftp.ssl.SSLFTPClient;
import com.enterprisedt.net.ftp.ssl.SSLFTPStandardValidator;
import com.enterprisedt.util.debug.Level;
import com.enterprisedt.util.debug.Logger;
import com.enterprisedt.util.debug.FileAppender;
import com.enterprisedt.util.debug.StandardOutputAppender;
import java.io.*;
import java.util.*;
import java.net.*;
import java.text.*;
public class wmPush2MF_new {
final static String debug = "all";
public static void main(String[] args) {
System.out.println("Setting SSL debugging to :" + debug);
System.setProperty("javax.net.debug", debug);
String password = "NotUsed";
//Logger log = Logger.getLogger(wmPush2MF_new.class);
//Logger.setLevel(Level.DEBUG);
try {
// set up logger so that we get some output
Logger log = Logger.getLogger(wmPush2MF_new.class);
Logger.setLevel(Level.DEBUG);
// log to a file and also to standard output
Logger.addAppender(new FileAppender("logs/MF_ftps.log"));
Logger.addAppender(new StandardOutputAppender());
log.info("This is an info message");
SSLFTPClient ftp = null;
// path to files
String absolutePath = "";
File sourceDirectory = new File(args[0]); // [0] directory
Roy