commit d5a1486f1a3be536ff50ac472ec196c9258030c6
Author: Tomáš Šimandl <tomas.simandl@gmail.com>
Date:   Thu Nov 29 21:35:21 2018 +0100

    #7 Use SLF4J logger
    
    - changed log4j configuration

diff --git a/sources/pom.xml b/sources/pom.xml
index 8f9c3f9..0dd1062 100644
--- a/sources/pom.xml
+++ b/sources/pom.xml
@@ -59,6 +59,12 @@
             <version>3.8.0</version>
         </dependency>
 
+        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.11.1</version>
+        </dependency>
         <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
@@ -66,6 +72,8 @@
             <version>2.11.1</version>
         </dependency>
 
+
+
         <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
         <dependency>
             <groupId>commons-fileupload</groupId>
diff --git a/sources/src/main/resources/log4j.xml b/sources/src/main/resources/log4j.xml
deleted file mode 100644
index eb46472..0000000
--- a/sources/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-	<!-- bundle-cmp tests logging configuration -->
-	<appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
-		<layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} %-6p [%c:%M:%L] - %m%n"/>
-		</layout>
-	</appender>
-	<!-- 
-	<appender name="fullLogFileAppender" class="org.apache.log4j.FileAppender">
-		<param name="File" value="h:/log/pia_prototype2_full.log" />
-		<param name="Append" value="true" />
-        <layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-6p [%c:%M:%L] - %m%n"/>
-		</layout>
-	</appender>
-	
-	<appender name="hibernateLogFileAppender" class="org.apache.log4j.FileAppender">
-		<param name="File" value="h:/log/pia_prototype2_hibernate.log" />
-		<param name="Append" value="true" />
-        <layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-6p [%c:%M:%L] - %m%n"/>
-		</layout>
-	</appender>
-	
-	<appender name="securityLogFileAppender" class="org.apache.log4j.FileAppender">
-		<param name="File" value="h:/log/pia_prototype2_security.log" />
-		<param name="Append" value="true" />
-        <layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-6p [%c:%M:%L] - %m%n"/>
-		</layout>
-	</appender>
-	
-	<appender name="springLogFileAppender" class="org.apache.log4j.FileAppender">
-		<param name="File" value="h:/log/pia_prototype2_spring.log" />
-		<param name="Append" value="true" />
-        <layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-6p [%c:%M:%L] - %m%n"/>
-		</layout>
-	</appender>
-	
-	<appender name="appLogFileAppender" class="org.apache.log4j.FileAppender">
-		<param name="File" value="h:/log/pia_prototype2.log" />
-        <param name="Append" value="true" />
-		<layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-6p [%c:%M:%L] - %m%n"/>
-		</layout>
-	</appender>-->
-	
-	<!--<logger name="cz.zcu.kiv.offscreen" additivity="false">
-		<level value="trace"/>
-		<appender-ref ref="consoleAppender"/>
-	</logger>-->
-	
-	<!--<logger name="org.springframework" additivity="false">
-		<level value="info"/>
-		<appender-ref ref="consoleAppender"/>
-	</logger>-->
-	
-	<root>
-		<level value="info" />
-		<appender-ref ref="consoleAppender"/>
-	</root>
-</log4j:configuration>
\ No newline at end of file
diff --git a/sources/src/main/resources/log4j2.properties b/sources/src/main/resources/log4j2.properties
new file mode 100644
index 0000000..bf4c521
--- /dev/null
+++ b/sources/src/main/resources/log4j2.properties
@@ -0,0 +1,18 @@
+name=PropertiesConfig
+property.filename = logs
+appenders = console, file
+
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern=%d{yy-MM-dd HH:mm:ss:SSS} %-6p [%c:%M:%L] - %m%n
+
+appender.file.type = File
+appender.file.name = LOGFILE
+appender.file.fileName=${filename}/propertieslogs.log
+appender.file.layout.type=PatternLayout
+appender.file.layout.pattern=%d{yy-MM-dd HH:mm:ss:SSS} %-6p [%c:%M:%L] - %m%n
+
+rootLogger.level = debug
+rootLogger.appenderRefs = stdout
+rootLogger.appenderRef.stdout.ref = STDOUT
\ No newline at end of file
