Skip to content

Commit

Permalink
Changing my new logging example to be more focused on just filling lo…
Browse files Browse the repository at this point in the history
…gs up
  • Loading branch information
kylape committed Dec 3, 2012
1 parent ddf20ab commit 07feadd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions 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`.
Expand Up @@ -25,7 +25,10 @@ public class LoggingServlet extends HttpServlet
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.");
}
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions loggingServlet.war/README.md

This file was deleted.

0 comments on commit 07feadd

Please sign in to comment.