diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 8a5af76fa..0152c5db5 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -39,6 +39,8 @@ import org.apache.poi.ss.ITestDataProvider; import org.apache.poi.ss.SpreadsheetVersion; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.SheetUtil; +import org.apache.poi.util.POILogFactory; +import org.apache.poi.util.POILogger; import org.junit.Assume; import org.junit.Ignore; import org.junit.Test; @@ -49,6 +51,8 @@ import org.junit.Test; * @author Yegor Kozlov */ public abstract class BaseTestBugzillaIssues { + + private static final POILogger logger = POILogFactory.getLogger(BaseTestBugzillaIssues.class); private final ITestDataProvider _testDataProvider; @@ -1427,12 +1431,13 @@ public abstract class BaseTestBugzillaIssues { public void test58896() throws IOException { final int nrows = 160; final int ncols = 139; - final java.io.PrintStream out = System.out; // Create a workbook final Workbook wb = _testDataProvider.createWorkbook(nrows+1); final Sheet sh = wb.createSheet(); - out.println(wb.getClass().getName() + " column autosizing timing..."); + if (logger.check(POILogger.DEBUG)) { + logger.log(POILogger.DEBUG, wb.getClass().getName() + " column autosizing timing..."); + } final long t0 = time(); _testDataProvider.trackAllColumnsForAutosizing(sh); @@ -1445,24 +1450,33 @@ public abstract class BaseTestBugzillaIssues { } final double populateSheetTime = delta(t0); final double populateSheetTimePerCell_ns = (1000000 * populateSheetTime / (nrows*ncols)); - out.println("Populate sheet time: " + populateSheetTime + " ms (" + populateSheetTimePerCell_ns + " ns/cell)"); - - out.println("\nAutosizing..."); + if (logger.check(POILogger.DEBUG)) { + logger.log(POILogger.DEBUG, "Populate sheet time: " + populateSheetTime + " ms (" + populateSheetTimePerCell_ns + " ns/cell)"); + + logger.log(POILogger.DEBUG, "Autosizing..."); + } final long t1 = time(); for (int c=0; c