From bef6d53f910e38f7f06b1aa4c65aad2525073cf9 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 22 Feb 2017 17:06:07 +0100
Subject: [PATCH] logging improved

---
 .../src/main/java/smash/appointment/parse/CellParser.java  | 7 ++++---
 .../src/test/java/smash/appointment/parse/TestBase.java    | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/appointment-import/src/main/java/smash/appointment/parse/CellParser.java b/appointment-import/src/main/java/smash/appointment/parse/CellParser.java
index 3c507c4d..3093c7d7 100644
--- a/appointment-import/src/main/java/smash/appointment/parse/CellParser.java
+++ b/appointment-import/src/main/java/smash/appointment/parse/CellParser.java
@@ -75,8 +75,8 @@ public class CellParser {
 								result = type;
 								usedString = string;
 							} else if (usedString.contains(string)) {
-								//new one is a substring of old
-							} else { //if there is no substring then we might have a problem
+								// new one is a substring of old
+							} else { // if there is no substring then we might have a problem
 								AppointmentType newType = result;
 								if (usedString.length() < string.length()) {
 									usedString = string;
@@ -130,7 +130,8 @@ public class CellParser {
 								newResult = subject;
 							}
 							logger.warn(
-									"More than one subject possible for query: " + query + ". Subject 1: " + result + ". Subject 2: " + subject + ". Choosing: " + newResult);
+									"[" + indexer.getClass().getSimpleName() + "]" + "More than one subject possible for query: " + query + ". Subject 1: " + result
+											+ ". Subject 2: " + subject + ". Choosing: " + newResult);
 							result = newResult;
 						}
 					}
diff --git a/appointment-import/src/test/java/smash/appointment/parse/TestBase.java b/appointment-import/src/test/java/smash/appointment/parse/TestBase.java
index e3b909e9..e38cc5c3 100644
--- a/appointment-import/src/test/java/smash/appointment/parse/TestBase.java
+++ b/appointment-import/src/test/java/smash/appointment/parse/TestBase.java
@@ -16,6 +16,7 @@ public class TestBase {
 	public void setUp() {
 		subjectDao = new SubjectDao();
 
+		subjectDao.addSubject(new Subject("Piotr Marcin", "Gawron", "ND0005", "5"));
 		subjectDao.addSubject(piotrGawron);
 		subjectDao.addSubject(janKowalskiNowak);
 		subjectDao.addSubject(johnDoe);
-- 
GitLab