Package com.enterprisedt.util.debug

Examples of com.enterprisedt.util.debug.Logger


        String host = args[0];
        String username = args[1];
        String password = args[2];

        // set up logger so that we get some output
        Logger log = Logger.getLogger(MonitorTransfersCommands.class);
        Logger.setLevel(Level.INFO);

        FileTransferClient ftp = null;

        try {
            // create client
            log.info("Creating FTP client");
            ftp = new FileTransferClient();

            // set remote host
            ftp.setRemoteHost(host);
            ftp.setUserName(username);
            ftp.setPassword(password);
           
            // set up listener
            ftp.setEventListener(new EventListenerImpl());
           
            // the transfer notify interval must be greater than buffer size
            ftp.getAdvancedSettings().setTransferBufferSize(500);
            ftp.getAdvancedSettings().setTransferNotifyInterval(1000);

            // connect to the server
            log.info("Connecting to server " + host);
            ftp.connect();
            log.info("Connected and logged in to server " + host);

            log.info("Uploading file");
            String name = "MonitorTransfersCommands.java";

            // put the file
            ftp.uploadFile(name, name);
            log.info("File uploaded");

            // now delete remote file
            ftp.deleteFile(name);

            // Shut down client
            log.info("Quitting client");
            ftp.disconnect();

            log.info("Example complete");

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here


    public static void main(String[] args) {
        if (args.length != 2) {
            usage();
        }
       
        Logger log = Logger.getLogger(FileParserTest.class);
        Logger.setLevel(Level.ALL);
       
        String type = args[0];
        String filename = args[1];
        if (!type.equalsIgnoreCase("UNIX") && !type.equalsIgnoreCase("WINDOWS")
             && !type.equalsIgnoreCase("VMS")) {
            usage();
        }
        log.debug("Type=" + type);
       
        Vector lines = new Vector();
        BufferedReader reader = null;
        String line = null;
        try {
View Full Code Here

TOP

Related Classes of com.enterprisedt.util.debug.Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.