Ceki -

Now that I look at the top of the source for PropertyConfigurator I see a mesage
to this effect.  D'oh!  Double that for the mail list archives.  Thanx!

Anywho, I have now converted over to using DomConfigurator, but I am still
having problems.  Pulled in the JAXP classes (including Crimson XML), already
had Xerces, etc.  (BTW, I am working in VisualAge 3.5 here at work; managing
different versions of the same packages is a pain), set up an XML config file,
and start up the app (servlet).  But I get the following errors:

Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
set, which is probably not what is desired.  Parser will use a default
ErrorHandler to print the first 10 errors.  Please call
the 'setErrorHandler' method to fix this.
Error: URI=valoader:/C:/Program Files/VisualAge for
Java/ide/project_resources/Log4J/org/apache/log4j/xml/log4j.dtd Line=7:
Undeclared prefix: "log4j:configuration".
log4j:ERROR No appenders could be found for category (webapp_loadconf).
log4j:ERROR Please initialize the log4j system properly.


The fifth line above seems to be of most concern.  I was actually getting a
different error until I noticed that the log4j.dtd file has a bug in it at line
9:
<!ELEMENT logj:configuration (renderer*, appender*,category*,root?)>
          ^^^^  should this not be log4j??

Changed it and I get the above.  Do I need to have an XML namespace defined
somewheres in my config file???

Here is the config file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<!-- log4j:configuration of the root category and our Priority sub-class.
-->

<log4j:configuration>
  <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern"
            value="%d %-5p [%t] %c %C{3} (%F:%L) - %m%n"/>
    </layout>       
  </appender>

  <root>
    <priority value="10" 
              class="com.iconnect_inc.util.Verbosity"/>
    <appender-ref ref="STDOUT" />
  </root>
</log4j:configuration>


> 
> -------- Original Message --------
> Subject: Re: Extending Priority class
> Date: Thu, 12 Apr 2001 08:57:39 +0200
> From: Ceki Gülcü <[EMAIL PROTECTED]>
> Reply-To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
> To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
> 
> Jeffrey,
> 
> Have a look at the examples under org/apache/log4j/xml/examples/X*.java
> and the XML configuration files extension*.xml. It is not yet possible
> to use custom priorities in property files.
> 
> For the mailing archives, see http://jakarta.apache.org/site/mail2.html.
> Regards, Ceki
> 
> At 21:56 11.04.2001 -0400, you wrote:
> >Sorry if this is an oft-times repeated thread, but I was wondering if it
> >is possible to configure logj4 to use a different priority scheme, one
> >that extends the Priority class?  I find the five or so levels provided
> >insufficient for my development needs, plus I am more accustomed to a
> >numerical log-level system (i.e. I don't want to have to remember that
> >ERROR is more verbose than WARN, etc.; 10 is verbose, 0 ain't).  From
> >what I can tell, I would have to write a custom extension of the
> >PropertyConfigurator to do this.  There is nothing in the documentation
> >that tells me how to configure the existing system to use a different
> >Priority system (unless I just haven't found it yet).  Any guidance?
> >Thanx in advance!
> >
> >jeff
> >
> >ps if there are searchable archives of the mailing list out there,
> >please tell me where so I can do some digging!
> 
> --
> Ceki Gülcü     Web: http://qos.ch
> email: [EMAIL PROTECTED] or [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Jeffrey Bonevich
Senior Consultant
InterConnect of Ann Arbor, Inc.
339 E. Liberty Street, Suite 320
Ann Arbor, Michigan 48104
Voice: 734.665.5342 x106
Fax:   734.665.3371
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to