From 3435e88c8885203542f8d8bfd947c4990d973408 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Sat, 23 Jun 2018 11:47:53 +0000 Subject: [PATCH] Logging verfeinert --- src/de/uhilger/bildhelfer/Verkleinerer.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/de/uhilger/bildhelfer/Verkleinerer.java b/src/de/uhilger/bildhelfer/Verkleinerer.java index 022e834..414383d 100644 --- a/src/de/uhilger/bildhelfer/Verkleinerer.java +++ b/src/de/uhilger/bildhelfer/Verkleinerer.java @@ -104,9 +104,11 @@ for(int i = 0; i < fileList.length; i++) { //System.out.println(fileList[i].getAbsolutePath()); + logger.fine(fileList[i].getAbsolutePath()); + File outDir = new File(outDirName); File outFile = new File(outDir, fileList[i].getName()); - //System.out.println(outFile.getAbsolutePath()); + logger.info(outFile.getAbsolutePath()); try { Image image = ImageIO.read(fileList[i]); MediaTracker mediaTracker = new MediaTracker(new Container()); @@ -206,14 +208,15 @@ } } catch (InterruptedException ex) { //System.out.println("Error: " + ex.getLocalizedMessage()); + logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex); } catch (FileNotFoundException e) { - e.printStackTrace(); + logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } catch (IOException e) { - e.printStackTrace(); + logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } } } else { - //System.out.println("fileList is null or empty"); + logger.info("fileList is null or empty"); } } } -- Gitblit v1.9.3