logo       

Re: log4cxx XML configuration and validation: msg#00012

Subject: Re: log4cxx XML configuration and validation

On Dec 5, 2006, at 7:45 AM, Sorin POPA wrote:

Hello, amigos!

There are two things I would like to ask advice for:

1. I would like to validate the XML configuration file for log4cxx in the project I am using. There is a "log4j.dtd" document in the 0.9.8 version from SVN which should serve this purpose. The thing with this DTD is that there is no definition for an element named "rollingPolicy" inside an "appender" element. This is observable by looking inside the DTD; we've tried to validate the XML configuration with Eclipse and its XML plugin and the result was the following:
    The content of element type "appender" must match
     "(errorHandler?,param*,layout?,filter*,appender-ref*)".

Is there something missing in the DTD file? The logger functions alright with the "rollingPolicy" element included in the XML configuration. So, this seems to be correctly specified.


The DTD was copied from the log4j project which has the same defect. log4j never uses the log4j.dtd and was not apparently kept in sync when new element types were added. The correct resolution to it would be to log a bug report for log4j and at least check all the test xml configuration files against the DTD as part of the build process and then move that over to log4cxx.



!!! I need to mention that the use of a PROPERTIES file in the case of having ANY kind of policies for logging (time based policies, rolling policies..) is not advisable as it seems that the policies don't work with other types of config files, but XML config files. This might be another issue.... I have read this on a log4cxx related discussion, but unfortunately I can't tell you where and I can't provide a link.



Should also be true for log4j.

2. Could anyone confirm the following being correct in the XML config file for log4cxx?...

<param name="Encoding" value="UTF-16"/>

I am using this to change the encoding of the log files to Unicode (the intention is to display Japanese, Arabic and other types of characters from other character sets) inside the <appender> ... </ appender> element in the XML file.


Should be but there are no tests that attempt to set the encoding through configuration files. All the unit tests use explicit setEncoding calls.





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe