logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas.J...@ubsw.com
Subject Urgent : Help Reuired
Date Tue, 10 Dec 2002 15:38:19 GMT

Sorry to intervene.
I am facing a big problem, i am able to implement the log4j.
i am also using WASD test environment.
Can you help me in configuring the log4j.
whenever i run the server, i get this error.

log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

I have a Log.java which is used to load the log4j
public class Log extends Logger {

 	private static final String LOG_CONFIG_FILE = "";
 	private static final String LOG_DELAY="20";	
   /** Loads the log4j config file located based on a system-property. */
   static {
		long delay = Long.parseLong(LOG_DELAY)*1000*60;

I have put the log4jConfig.xml(log4j configuration) in web-inf.

Is it correct way of configuring it. please guide me if i am wrong,or why i am getting that
What i understood is web-sphere tries to initialise the log4j before the application gets
initialised. I bit struggling with this for one day.. please help me out

Thanks in advance

-----Original Message-----
From: Ceki Gülcü [mailto:ceki@qos.ch]
Sent: Tuesday, December 10, 2002 10:21 AM
To: Log4J Users List
Subject: RE: Error in renaming the file During DailyRollover option

Is the previous run of your servlet closed and unloaded when you run the 
new version? What happens if you change the DatePattern to 
.yyyy-MM-dd-HH-mm (minutely rollover)? Do rollovers occur?

At 20:43 10.12.2002 +0530, Shailesh Vaidya wrote:
>I am using WebSphere Application Developer Test Engine. The Config file
>details are as follows. I am using the default config file log4j.properties
>and it is kept in web-inf\classes directly. The messages are properly
>logged. Just that file remains open even when the doGet method is over. When
>I try to run the servlet the next day ( by changing the system date and
>time) I get the message "log4j:ERROR Failed to rename [d:\ajit\example] to
>log4j.appender.R.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
>-----Original Message-----
>From: Ceki Gulcu [mailto:ceki@qos.ch]
>Sent: Tuesday, December 10, 2002 8:24 PM
>To: Log4J Users List
>Subject: Re: Error in renaming the file During DailyRollover option
>Which server engine is this? What is your config file?
>At 00:19 19.12.2002 +0530, Shailesh Vaidya wrote:
> >Hi,
> >
> >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
> >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
> >ERROR");
> >         log.fatal("Just testing a log message with priority set to
> >
> >    }
> >}
> >
> >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
> >the servlet engine.
> >
> >How could we rectify this error so that rollover happens properly.
> >
> >Thanks in advance for any help.
> >
> >
> >Shailesh
> >
> >
> >--
> >To unsubscribe, e-mail:
> >For additional commands, e-mail:
>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>


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

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

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