Package org.apache.logging.log4j.core.appender.rolling.action

Examples of org.apache.logging.log4j.core.appender.rolling.action.FileRenameAction.execute()


        }
        pos.close();

        final File dest = new File("target/fileRename/newFile.log");
        final FileRenameAction action = new FileRenameAction(file, dest, false);
        action.execute();
        assertTrue("Renamed file does not exist", dest.exists());
        assertTrue("Old file exists", !file.exists());
    }

    @Test
View Full Code Here


        final PrintStream pos = new PrintStream(file);
        pos.close();

        final File dest = new File("target/fileRename/newFile.log");
        final FileRenameAction action = new FileRenameAction(file, dest, false);
        action.execute();
        assertTrue("Renamed file does not exist", !dest.exists());
        assertTrue("Old file does not exist", !file.exists());
    }

View Full Code Here

        pos.close();

        final File dest = new File("newFile.log");
        try {
            final FileRenameAction action = new FileRenameAction(file, dest, false);
            action.execute();
            assertTrue("Renamed file does not exist", dest.exists());
            assertTrue("Old file exists", !file.exists());
        } finally {
            try {
                dest.delete();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.