Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changing my new logging example to be more focused on just filling lo…

…gs up
  • Loading branch information...
commit 07feadd35cabb2a608a0704e204baaf513996804 1 parent ddf20ab
@kylape authored
View
0  loggingServlet.war/META-INF/MANIFEST.MF → fillMyLogsPlease.war/META-INF/MANIFEST.MF
File renamed without changes
View
5 fillMyLogsPlease.war/README.md
@@ -0,0 +1,5 @@
+###Servlet used to fill your logs
+
+This servlet simply logs to two different `java.util.logging.Logger`s: `com.redhat.gss.logging.LoggingServlet` and `some.fun.class.Name`. The statements are really long so testing for log rotation won't take as many invocations of the servlet. Alos, the `INFO`-level message to `LoggingServlet` is logged 1000 times per invocation.
+
+To invoke the servlet, run `curl curl http://localhost:8080/fillMyLogsPlease/logging`. To invoke indefinitely, run `for (( ; ; )); do curl http://localhost:8080/fillMyLogsPlease/logging; done`.
View
5 ...lasses/com/redhat/gss/logging/LoggingServlet.java → ...lasses/com/redhat/gss/logging/LoggingServlet.java
@@ -25,7 +25,10 @@
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
- log.info("This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement.");
+ for(int i=0; i<1000; i++)
+ {
+ log.info("This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement. This is a really big log statement.");
+ }
log2.fine("This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement. This is a really fine log statement.");
}
View
0  loggingServlet.war/WEB-INF/web.xml → fillMyLogsPlease.war/WEB-INF/web.xml
File renamed without changes
View
0  loggingServlet.war/build.xml → fillMyLogsPlease.war/build.xml
File renamed without changes
View
5 loggingServlet.war/README.md
@@ -1,5 +0,0 @@
-###Basic logging servlet
-
-This servlet simply logs to two different `java.util.logging.Logger`s: `com.redhat.gss.logging.LoggingServlet` and `some.fun.class.Name`. The statements are really long so testing for log rotation won't take as many invocations of the servlet.
-
-To invoke the servlet, run `curl curl http://localhost:8080/loggingServlet/logging`. To invoke indefinitely, run `for (( ; ; )); do curl http://localhost:8080/loggingServlet/logging; done`.
Please sign in to comment.
Something went wrong with that request. Please try again.