diff --git a/.classpath b/.classpath index a7d817e..de8b408 100644 --- a/.classpath +++ b/.classpath @@ -10,5 +10,7 @@ + + diff --git a/build.num b/build.num index 515c446..d0b2ba9 100644 --- a/build.num +++ b/build.num @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Thu Jun 20 02:51:05 CEST 2013 -build.number=5 +#Wed Jun 26 14:05:55 CEST 2013 +build.number=6 diff --git a/lib/README b/lib/README index 9e03890..d8d0324 100644 --- a/lib/README +++ b/lib/README @@ -7,3 +7,5 @@ Description of used libraries: - junit: unit tests API - log4j: log API - servlet-api: servlet API +- slf4j-api: facade log API +- slf4j-log4j12: adaptation layer between slf4j and log4j \ No newline at end of file diff --git a/lib/slf4j-api-1.7.5-sources.jar b/lib/slf4j-api-1.7.5-sources.jar new file mode 100644 index 0000000..51abe2b Binary files /dev/null and b/lib/slf4j-api-1.7.5-sources.jar differ diff --git a/lib/slf4j-api-1.7.5.jar b/lib/slf4j-api-1.7.5.jar new file mode 100644 index 0000000..8766455 Binary files /dev/null and b/lib/slf4j-api-1.7.5.jar differ diff --git a/lib/slf4j-log4j12-1.7.5-sources.jar b/lib/slf4j-log4j12-1.7.5-sources.jar new file mode 100644 index 0000000..ea1b93b Binary files /dev/null and b/lib/slf4j-log4j12-1.7.5-sources.jar differ diff --git a/lib/slf4j-log4j12-1.7.5.jar b/lib/slf4j-log4j12-1.7.5.jar new file mode 100644 index 0000000..afce5c2 Binary files /dev/null and b/lib/slf4j-log4j12-1.7.5.jar differ diff --git a/src/fr/devinsy/kiss4web/CookieHelper.java b/src/fr/devinsy/kiss4web/CookieHelper.java index 5e8aad5..33e0a6d 100644 --- a/src/fr/devinsy/kiss4web/CookieHelper.java +++ b/src/fr/devinsy/kiss4web/CookieHelper.java @@ -4,12 +4,15 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * */ public class CookieHelper { - static protected org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(CookieHelper.class); + static private final Logger logger = LoggerFactory.getLogger(CookieHelper.class); /** * diff --git a/src/fr/devinsy/kiss4web/ServletDispatcher.java b/src/fr/devinsy/kiss4web/ServletDispatcher.java index dd3b943..161dfbb 100755 --- a/src/fr/devinsy/kiss4web/ServletDispatcher.java +++ b/src/fr/devinsy/kiss4web/ServletDispatcher.java @@ -14,13 +14,16 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * */ public class ServletDispatcher extends SimpleServletDispatcher { private static final long serialVersionUID = -3471226305721330069L; - protected org.apache.log4j.Logger logger; + static private Logger logger; // protected Servlets servlets; @@ -68,7 +71,7 @@ public class ServletDispatcher extends SimpleServletDispatcher public void init() throws ServletException { super.init(); - this.logger = org.apache.log4j.Logger.getLogger(this.getClass()); + logger = LoggerFactory.getLogger(this.getClass()); // this.servlets = new Servlets(); } } diff --git a/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java b/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java index 6916ef1..7dda482 100755 --- a/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java +++ b/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java @@ -19,6 +19,9 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import fr.devinsy.util.StringList; /** @@ -27,7 +30,7 @@ import fr.devinsy.util.StringList; public class SimpleServletDispatcher extends HttpServlet { private static final long serialVersionUID = -3471226305721330069L; - static protected org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(ServletDispatcher.class); + static private Logger logger = LoggerFactory.getLogger(ServletDispatcher.class); static final protected Pattern SHORT_REWRITED_URL_CLASS = Pattern.compile("^([^-]+)-.+\\.xhtml$"); static final protected Pattern SHORT_REWRITED_URL_PARAMETERS = Pattern.compile("^[^-]+-(.+)\\.xhtml$"); @@ -181,7 +184,7 @@ public class SimpleServletDispatcher extends HttpServlet org.apache.log4j.BasicConfigurator.configure(); } - logger = org.apache.log4j.Logger.getLogger(this.getClass()); + logger = LoggerFactory.getLogger(this.getClass()); logger.info("Log initialization done."); } } diff --git a/src/fr/devinsy/util/web/FileItemHelper.java b/src/fr/devinsy/util/web/FileItemHelper.java index 619275c..b43e73f 100644 --- a/src/fr/devinsy/util/web/FileItemHelper.java +++ b/src/fr/devinsy/util/web/FileItemHelper.java @@ -9,8 +9,8 @@ import org.apache.commons.fileupload.FileItem; */ public class FileItemHelper { - // static private org.apache.log4j.Logger logger = - // org.apache.log4j.Logger.getLogger (FileItemHelper.class); + // static private final Logger logger = + // LoggerFactory.getLogger(FileItemHelper.class); /** * List FileItem diff --git a/src/fr/devinsy/util/web/Redirector.java b/src/fr/devinsy/util/web/Redirector.java index ea43c88..d1bfaba 100644 --- a/src/fr/devinsy/util/web/Redirector.java +++ b/src/fr/devinsy/util/web/Redirector.java @@ -2,12 +2,15 @@ package fr.devinsy.util.web; import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * */ public class Redirector { - static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Redirector.class); + static private final Logger logger = LoggerFactory.getLogger(Redirector.class); /** * diff --git a/src/fr/devinsy/util/web/SimpleSecurityAgent.java b/src/fr/devinsy/util/web/SimpleSecurityAgent.java index fb17e72..367d8ab 100644 --- a/src/fr/devinsy/util/web/SimpleSecurityAgent.java +++ b/src/fr/devinsy/util/web/SimpleSecurityAgent.java @@ -4,6 +4,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.codec.digest.DigestUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import fr.devinsy.kiss4web.CookieHelper; @@ -12,7 +14,7 @@ import fr.devinsy.kiss4web.CookieHelper; */ public class SimpleSecurityAgent { - static protected org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(SimpleSecurityAgent.class); + static private final Logger logger = LoggerFactory.getLogger(SimpleSecurityAgent.class); final static public String USERID_LABEL = "securityAgent.userId"; final static public String ACCOUNTID_LABEL = "securityAgent.accountId"; final static public String AUTH_LABEL = "securityAgent.auth"; diff --git a/test/FooPlayer.java b/test/FooSandbox.java similarity index 94% rename from test/FooPlayer.java rename to test/FooSandbox.java index d8dbf7f..b78de4d 100644 --- a/test/FooPlayer.java +++ b/test/FooSandbox.java @@ -7,7 +7,7 @@ import fr.devinsy.kiss4web.ServletDispatcher; /** * */ -class FooPlayer +class FooSandbox { static private org.apache.log4j.Logger logger; @@ -32,7 +32,7 @@ class FooPlayer logger.info("... done."); logger.debug("Exit"); - logger = org.apache.log4j.Logger.getLogger(FooPlayer.class.getName()); + logger = org.apache.log4j.Logger.getLogger(FooSandbox.class.getName()); } /**