You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Mark Womack <mw...@bevocal.com> on 2002/12/19 22:40:50 UTC

Configuration Servlet Features

> I think that his servlet is a really good base for displaying current
> configuration information for a web application.  I have a 
> couple of ideas
> for feature additions that I will go into later.  If anyone 
> has any other
> ideas or code submissions in this vein, please post.

OK, here are a couple of ideas that I have:

1) The logger information can be displayed in a hierarchical nature, by
package name.  So, if you have a lot of loggers, you can expand to the ones
that you care about, hiding the rest.  Maybe the servlet could switch
between the current view and the hierarchical view.  I wrote some code that
gets the current loggers and then allows you to iterate through the package
names, getting information at each level.  I will post it later.  All that
is needed is another object to keep track of display state (what is
expanded) and this could be stored by the servlet in the web session.  My
code does not have any side effects (ie it does not create new loggers).
Then the page generation code could reference this object to display the
logger info.

So, instead of

com.mycompany.servlet.HttpUtils
com.mycompany.servlet.Servlet
com.mycompany.servlet.StringUtils
com.mycompany.util.JMSUtils
com.mycompany.util.Log4jUtils
com.mycompany.util.StringUtils

You would see

com

with a link to expand it (either on the package name or a little expander
icon).  Eventually you could display something like this:

com
 mycompany
  servlet
   HttpUtils
   Servlet
   ServletUtils
  util

2) Allow the level to be set for any logger, not just the ones that have
been created.  This is simple to do in log4j.  Just do a getLogger() for the
package name you want.  If the logger does not exist log4j will create it.
So, modify the servlet to have a text edit box where the user can type in
the name and set the desired level via a popup.

3) Built-in help.  Have a "verbose" mode on the servlet where description
text on how to use the various bits of interface are displayed.  This mode
can be turned on/off.

4) Useful links.  Maybe have some links to the log4j jakarta home page or
something on the page generated by the servlet.

-Mark

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>