logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattias Andersson" <mailing_lists+lo...@caleotech.com>
Subject Adding new tags to log4j XML configuration file
Date Wed, 13 Dec 2006 09:57:21 GMT

I'm using log4j 1.2.14 and I'd like to add my own tags to the log4j XML
configuration file. The reason for this is that we have built a logging
server and to avoid having two configuration files I'd like to add some
new tags to XML file.

I've added the following to my XML file and the parser generates
(correctly) a waring about redefinition of log4j:configuration DTD
element. The parsing of the XML file works fine anyway it's just the
warning I'd like to avoid since users tends to notice warnings and ask
questions. Perhaps this warning can be turned of?

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" [
  <!ELEMENT log4j:configuration (renderer*,
                                 categoryFactory?, server)>
  <!ELEMENT server EMPTY >
  <!ATTLIST server
    port	CDATA	#REQUIRED >

log4j:WARN Continuable parsing error 12 and column 50
log4j:WARN Element type "log4j:configuration" must not be declared more
than once.

I'm not an expert on DTD but it should be possible to write the log4j.dtd 
so that you can add your own tags, or? Or have someone extended the XML
file and solved it in another way?

Any help or pointers would be appreciated.


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message