Have you tied observing the messages sent out at configuration time?
Try
log4j.configDebug=true
in the log4j.properties file. What do you observe? Ceki
At 11:22 27.03.2001 +0200, you wrote:
>Hello,
>
>I run into troubles with Log4j, until yesterday all worked fine but now I
>cannot get the configuration stuff to work again...
>
>
>Here's my log4j.properties file:
>
>log4j.category.de.autogui=DEBUG, A1
>log4j.appender.A1=org.apache.log4j.FileAppender
>log4j.appender.A1.File=/var/local/autogui/global.log
>log4j.appender.A1.Append=false
>log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>log4j.appender.A1.layout.ConversionPattern=[%c{1}] %-5p - %m%n
>
>
>This is the java code snippet which loads the .properties file:
>
> String filename = "/WEB-INF/etc/log4j.properties";
> // filename =
>getServletContext().getResource(filename).toString().substring(5);
>
> // filename = /var/tomcat/webapps/autogui/WEB-INF/etc/log4j.properties
> // System.err.println(filename);
>
> Properties props = new Properties();
> // InputStream in = new FileInputStream(filename);
> InputStream in = getServletContext().getResourceAsStream(filename);
>
> if (in != null) {
> System.err.println("DEBUG: loading properties");
> props.load(in);
> new PropertyConfigurator().doConfigure(props,
>Category.getDefaultHierarchy());
> in.close();
> } else {
> System.err.println("ERROR:" + filename);
> }
>
>I always get a log4j:ERROR No appenders could be found for category
>(de.autogui.servlets.BaseServlet and a log4j:ERROR Please initialize the
>log4j system properly message. Also I've already installed the latest
>version from CVS - didn't help much...
>
>I just wonder cause the messages for the BaseServlet are logged in the
>global.log file, but log4j says there are no Appenders configured???
>
>Please help, I don't have any idea any more... :->
>
>cu talex
>
>
>--
>__________________________________________________
> ____________
> /___________/ alexander troppmann
> software design & technology
> g l o b a l
> ____________ global linxs gmbh
> /___________/ hedwigstrasse 9
> 80636 munich
> l i n x s
> ____________ fon ++49(0)89 18.97.97.87
> /___________/ fax ++49(0)89 18.97.97.96
>
> gesellschaft fuer
> internetservices mbh
> http://www.global-linxs.com
>__________________________________________________
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
I hope to see you at my ApacheCon 2001 presentation
entitled "Log4j, A Logging Package for Java".
See http://ApacheCon.Com/2001/US/ for more details.
--
Ceki Gülcü Web: http://qos.ch
email: [EMAIL PROTECTED] (preferred)
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]