logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Error in renaming the file During DailyRollover option
Date Tue, 10 Dec 2002 14:54:26 GMT

Which server engine is this? What is your config file?

At 00:19 19.12.2002 +0530, Shailesh Vaidya wrote:

>I am trying to use DailyRollingFileAppender. When the  logger tries to
>rollover and rename the file we get a error message
>Can not rename the file exaple.log to example.log.mm-dd-yyyy". The reason is
>the file remains open. I am logging in a servlet
>the code is
>import java.io.*;
>import org.apache.log4j.*;
>import javax.servlet.http.HttpServlet;
>public class LoggingServlet extends HttpServlet {
>         public void doGet(
>             javax.servlet.http.HttpServletRequest request,
>                 javax.servlet.http.HttpServletResponse response)
>                 throws javax.servlet.ServletException, java.io.IOException {
>           Logger log = Logger.getLogger("log1");
>           log.debug("Start of main()");
>         log.info("Just testing a log message with priority set to INFO");
>         log.warn("Just testing a log message with priority set to WARN");
>         log.error("Just testing12 a log message with priority set to
>         log.fatal("Just testing a log message with priority set to FATAL");
>    }
>Actually the error occurs because the file is locked by the servlet engine
>even when the doGet method finishes. The lock gets released only when I stop
>the servlet engine.
>How could we rectify this error so that rollover happens properly.
>Thanks in advance for any help.
>To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


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

View raw message