Have you tried using PropertyConfigurator.configureAndWatch(String
configFilename, long delay) instead of configure(String filename)?

On Wed, 2002-10-23 at 18:00, Carson, Chuck wrote:
> 
> I am using a servlet to intialize log4j as so:
> 
> public class Log4jInit extends HttpServlet
> {
>     public void init()
>     {
>       String prefix_dir   = getServletContext().getRealPath("/");
>       String param_file   = getInitParameter("log4j-init-file");
>       PropertyConfigurator.configure(prefix_dir + param_file);
>     }
> 
>     public void doGet(HttpServletRequest req, HttpServletResponse res)
>     {
>     }
>     public void doPost(HttpServletRequest req, HttpServletResponse res)
>     {
>     }
> }
> 
> I have this in ROOT/WEB-INF/web.xml:
>     <servlet>
>                 <servlet-name>Log4jInit</servlet-name>
>                 <servlet-class>Log4jInit</servlet-class>
>                 <init-param>
>                     <param-name>log4j-init-file</param-name>
>                     <param-value>WEB-INF/log4j.config</param-value>
>                 </init-param>
>                 <load-on-startup>1</load-on-startup>
>     </servlet>
> 
> This works fine, however, any changes made to log4j.config do not take effect until 
>the server is restarted. Is the something I can code or something I can configure to 
>change this?
> 
> Much thanks,
> Chuck
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:log4j-user-help@;jakarta.apache.org>
-- 
[]'s
Daniel Serodio


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@;jakarta.apache.org>

Reply via email to