Migrated logging to log4j2 and adapted java.util.logging to log4j.
Change-Id: I587a8f0252714e17ec70e0f9eb5db63aca292b5f
diff --git a/full/src/main/resources/db/new-sqlite/V1.5__oauth2_triggers.sql b/full/src/main/resources/db/new-sqlite/V1.5__oauth2_triggers.sql
index c55d659..d62e4df 100644
--- a/full/src/main/resources/db/new-sqlite/V1.5__oauth2_triggers.sql
+++ b/full/src/main/resources/db/new-sqlite/V1.5__oauth2_triggers.sql
@@ -5,7 +5,7 @@
WHERE rowid = new.rowid;
END;
-CREATE TRIGGER insert_access_token_date BEFORE INSERT ON oauth2_access_token
+CREATE TRIGGER insert_access_token_date AFTER INSERT ON oauth2_access_token
BEGIN
UPDATE oauth2_access_token
SET created_date = DATETIME('now', 'localtime')
diff --git a/full/src/main/resources/log4j.properties b/full/src/main/resources/log4j.properties
deleted file mode 100644
index c747b68..0000000
--- a/full/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# Root logger option
-#log4j.threshold=ALL
-log4j.rootLogger=ERROR, stdout, debugLog
-log4j.logger.log=ERROR, errorLog
-
-#log4j.logger.de.ids_mannheim.korap.web.controller.AuthenticationController = debug, debugLog, stdout
-#log4j.logger.de.ids_mannheim.korap.service.UserGroupService= debug, stdout, debugLog
-#log4j.logger.de.ids_mannheim.korap.rewrite.CollectionRewrite= debug, stdout, debugLog
-#log4j.logger.de.ids_mannheim.korap.service.MailService= debug, stdout, debugLog
-
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
-
-log4j.appender.errorLog=org.apache.log4j.RollingFileAppender
-log4j.appender.errorLog.layout=org.apache.log4j.PatternLayout
-log4j.appender.errorLog.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss} %C{6} - %M %n %-5p: %m%n
-log4j.appender.errorLog.File=./logs/errors.log
-
-log4j.appender.policyLog=org.apache.log4j.RollingFileAppender
-log4j.appender.policyLog.layout=org.apache.log4j.PatternLayout
-log4j.appender.policyLog.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss} %C{6} - %M %n %-5p: %m%n
-log4j.appender.policyLog.File=./logs/policies.log
-
-log4j.appender.authLog=org.apache.log4j.RollingFileAppender
-log4j.appender.authLog.layout=org.apache.log4j.PatternLayout
-log4j.appender.authLog.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss} %C{6} - %M %n %-5p: %m%n
-log4j.appender.authLog.File=./logs/auth.log
-
-log4j.appender.debugLog=org.apache.log4j.RollingFileAppender
-log4j.appender.debugLog.layout=org.apache.log4j.PatternLayout
-log4j.appender.debugLog.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss} %C{6} - %M %n %-5p: %m%n
-log4j.appender.debugLog.File=./logs/logging.log
-
-
-log4j.logger.de.ids_mannheim.korap.security.ac = ERROR, policyLog
-log4j.logger.de.ids_mannheim.korap.authentication = ERROR, authLog
\ No newline at end of file
diff --git a/full/src/main/resources/log4j2.properties b/full/src/main/resources/log4j2.properties
new file mode 100644
index 0000000..1038fe2
--- /dev/null
+++ b/full/src/main/resources/log4j2.properties
@@ -0,0 +1,29 @@
+appenders = console, file
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
+
+appender.file.type = File
+appender.file.name = ERRORLOG
+appender.file.fileName=./logs/errors.log
+appender.file.layout.type=PatternLayout
+appender.file.layout.pattern= %d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
+
+rootLogger.level = error
+rootLogger.appenderRefs = stdout
+rootLogger.appenderRef.stdout.ref = STDOUT
+
+#loggers=file
+#logger.file.name=de.ids_mannheim.korap
+#logger.file.level = error
+#logger.file.appenderRefs = file
+#logger.file.appenderRef.file.ref = ERRORLOG
+#logger.file.additivity=true
+
+#loggers=file
+#logger.file.name=com.sun.jersey.test.framework.spi.container
+#logger.file.level = info
+#logger.file.appenderRefs = file
+#logger.file.appenderRef.file.ref = ERRORLOG
+#logger.file.additivity=false
\ No newline at end of file