From c05f86a9d862871452f59fbc5aeb3153844dec9e Mon Sep 17 00:00:00 2001 From: Andreas Egger Date: Tue, 21 May 2013 09:36:10 +0200 Subject: [PATCH] Small adjustments --- src/at/ac/tuwien/lsdc/sched/AbstractScheduler.java | 9 +++++++-- src/at/ac/tuwien/lsdc/util/CSVParser.java | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/at/ac/tuwien/lsdc/sched/AbstractScheduler.java b/src/at/ac/tuwien/lsdc/sched/AbstractScheduler.java index 1de5046..7c336de 100644 --- a/src/at/ac/tuwien/lsdc/sched/AbstractScheduler.java +++ b/src/at/ac/tuwien/lsdc/sched/AbstractScheduler.java @@ -7,6 +7,9 @@ import java.util.HashMap; import java.util.LinkedList; import java.util.Map; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import at.ac.tuwien.lsdc.types.Application; import at.ac.tuwien.lsdc.types.ScenarioData; import at.ac.tuwien.lsdc.types.ScenarioType; @@ -17,6 +20,8 @@ import at.ac.tuwien.lsdc.util.CSVLogger; public abstract class AbstractScheduler { + private static final Logger log = LoggerFactory.getLogger(AbstractScheduler.class); + // the following types are only needed for correct // log output protected SchedulerType schedulerType; @@ -63,7 +68,7 @@ public abstract class AbstractScheduler { try { logger.close(); } catch (IOException e) { - System.err.println("couldn't close logger"); + log.error("couldn't close logger"); } return doEndLogging(); } @@ -90,7 +95,7 @@ public abstract class AbstractScheduler { try { logger.logSchedulerData(data); } catch (IOException e) { - System.err.println("error logging data"); + log.error("error logging data"); } } diff --git a/src/at/ac/tuwien/lsdc/util/CSVParser.java b/src/at/ac/tuwien/lsdc/util/CSVParser.java index 39d26a5..388fdd8 100644 --- a/src/at/ac/tuwien/lsdc/util/CSVParser.java +++ b/src/at/ac/tuwien/lsdc/util/CSVParser.java @@ -25,7 +25,7 @@ public class CSVParser { String[] line = file.get(i); if (line.length != 5) { reader.close(); - throw new IOException("Too many elements in line " + i + 1); + throw new IOException("CSVParser: Not right amount of elements in line " + i + 1); } else { try { Application a = parseLine(line); -- 2.43.0