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 Luther Birdzell <le...@yahoo.com> on 2002/12/18 20:08:40 UTC

RE: RE: Log4jControlServlet

Michael,

I originally wrote this servlet so that I could dynamically adjust logging levels remotely in instances where I did not have convenient access to the log4j configuration file but did have access to the application log.  For example: the config file was in '/WEB-INF/properties' on a managed server (no direct access), but a log was written to a shared drive that I could access.  I have also found this servlet helpful when I use the command line to load the config file (i.e. -Dlog4j.configuration=file:%WEB_APP_PROPS%\log4j.properties) instead of loading the config file in a startup class using the configureAndWatch method.

Luther



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

RE: RE: Log4jControlServlet

Posted by Luther Birdzell <le...@yahoo.com>.
Raj, 
This servlet compliments configureAndWatch by providing an alternate way to adjust logging levels while the application is running. I think that your guess about how this servlet will behave in a cluster is accurate. JMX is probably a more direct way to control logging levels throughout a cluster, although I don't know if anyone has implemented that functionality yet. 

Luther 


Sanjay Raj wrote:Luther,Would this work with configureAndWatch? Also we uselog4j within a weblogic cluster. i wonder how it willbehave in a cluster, my guess it will change thelevels on the server which handled the servlet requestwhile on other server within the cluster it willremain unchanged?Raj--- Luther Birdzell wrote:> > Michael,> > I originally wrote this servlet so that I could> dynamically adjust logging levels remotely in> instances where I did not have convenient access to> the log4j configuration file but did have access to> the application log. For example: the config file> was in '/WEB-INF/properties' on a managed server (no> direct access), but a log was written to a shared> drive that I could access. I have also found this> servlet helpful when I use the command line to load> the config file (i.e.>-Dlog4j.configuration=file:%WEB_APP_PROPS%\log4j.properties)> instead of loading the config file in a startup> class using the configureAndWatch method.> > Luther> > > > ---------------------------------> Do you Yahoo!?> Yahoo! Mail Plus - Powerful. Affordable. Sign up now=====617.591.9104 (R)617.794.2615 (M)__________________________________________________Do you Yahoo!?New DSL Internet Access from SBC & Yahoo!http://sbc.yahoo.com--To unsubscribe, e-mail: For additional commands, e-mail: 


---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

RE: RE: Log4jControlServlet

Posted by Luther Birdzell <le...@yahoo.com>.
Raj,
This servlet compliments configureAndWatch by providing an alternate way to adjust logging levels while the application is running.  I think that your guess about how this servlet will behave in a cluster is accurate.  JMX is probably a more direct way to control logging levels throughout a cluster, although I don't know if anyone has implemented that functionality yet.
Luther
 Sanjay Raj <sa...@yahoo.com> wrote:Luther,
Would this work with configureAndWatch? Also we use
log4j within a weblogic cluster. i wonder how it will
behave in a cluster, my guess it will change the
levels on the server which handled the servlet request
while on other server within the cluster it will
remain unchanged?

Raj

--- Luther Birdzell wrote:
> 
> Michael,
> 
> I originally wrote this servlet so that I could
> dynamically adjust logging levels remotely in
> instances where I did not have convenient access to
> the log4j configuration file but did have access to
> the application log. For example: the config file
> was in '/WEB-INF/properties' on a managed server (no
> direct access), but a log was written to a shared
> drive that I could access. I have also found this
> servlet helpful when I use the command line to load
> the config file (i.e.
>
-Dlog4j.configuration=file:%WEB_APP_PROPS%\log4j.properties)
> instead of loading the config file in a startup
> class using the configureAndWatch method.
> 
> Luther
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


=====
617.591.9104 (R)
617.794.2615 (M)

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

RE: RE: Log4jControlServlet

Posted by Sanjay Raj <sa...@yahoo.com>.
Luther,
   Would this work with configureAndWatch? Also we use
log4j within a weblogic cluster. i wonder how it will
behave in a cluster, my guess it will change the
levels on the server which handled the servlet request
while on other server within the cluster it will
remain unchanged?

Raj

--- Luther Birdzell <le...@yahoo.com> wrote:
> 
> Michael,
> 
> I originally wrote this servlet so that I could
> dynamically adjust logging levels remotely in
> instances where I did not have convenient access to
> the log4j configuration file but did have access to
> the application log.  For example: the config file
> was in '/WEB-INF/properties' on a managed server (no
> direct access), but a log was written to a shared
> drive that I could access.  I have also found this
> servlet helpful when I use the command line to load
> the config file (i.e.
>
-Dlog4j.configuration=file:%WEB_APP_PROPS%\log4j.properties)
> instead of loading the config file in a startup
> class using the configureAndWatch method.
> 
> Luther
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


=====
617.591.9104 (R)
617.794.2615 (M)

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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