diff --git a/WebContent/WEB-INF/log4j.properties b/WebContent/WEB-INF/log4j.properties new file mode 100644 index 0000000..33f8b75 --- /dev/null +++ b/WebContent/WEB-INF/log4j.properties @@ -0,0 +1,5 @@ +log4j.rootLogger=INFO, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n diff --git a/WebContent/admin.jsp b/WebContent/admin.jsp index 70afe29..058850a 100644 --- a/WebContent/admin.jsp +++ b/WebContent/admin.jsp @@ -31,6 +31,7 @@ Administration tools. <%@ page import="com.google.inject.Key" %> <%@ page import="com.google.inject.TypeLiteral" %> <%@ page import="net.socialgamer.cah.RequestWrapper" %> +<%@ page import="net.socialgamer.cah.StartupUtils" %> <%@ page import="net.socialgamer.cah.CahModule.BanList" %> <%@ page import="net.socialgamer.cah.Constants.DisconnectReason" %> <%@ page import="net.socialgamer.cah.Constants.LongPollEvent" %> @@ -116,6 +117,11 @@ if (unbanParam != null) { return; } +String reloadLog4j = request.getParameter("reloadLog4j"); +if ("true".equals(reloadLog4j)) { + StartupUtils.reconfigureLogging(this.getServletContext()); +} + %> @@ -218,6 +224,7 @@ User list: <% +// TODO remove this "verbose logging" crap now that log4j is working. Boolean verboseDebugObj = (Boolean) servletContext.getAttribute(StartupUtils.VERBOSE_DEBUG); boolean verboseDebug = verboseDebugObj != null ? verboseDebugObj.booleanValue() : false; %> @@ -225,6 +232,9 @@ boolean verboseDebug = verboseDebugObj != null ? verboseDebugObj.booleanValue() Verbose logging is currently <%= verboseDebug ? "ON" : "OFF" %>. Turn on. Turn off.
+