You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Robin Pradel (JIRA)" <ji...@apache.org> on 2013/11/21 12:18:36 UTC

[jira] [Commented] (LOG4J2-411) Support of XSD/DTD linked to the configuration file

    [ https://issues.apache.org/jira/browse/LOG4J2-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828842#comment-13828842 ] 

Robin Pradel commented on LOG4J2-411:
-------------------------------------

It would be very nice, if the the XML configuration uses an dedicated namespace, e.g. {{http://logging.apache.org/log4j/2.0/config}}.
This feature allows using XML catalogs to locate the schema locally, e.g. with [Eclipse IDE|http://wiki.eclipse.org/Using_the_XML_Catalog].
The {{Log4j-events.xsd}} contains already such a declaration:
{code:xml}
targetNamespace="http://logging.apache.org/log4j/2.0/events"
{code}

Then the configuration XML file needs only a small extension:
{code:xml|title=log4j2.xml}
<?xml version="1.0" encoding="utf-8"?>
<Configuration status="WARN" xmlns="http://logging.apache.org/log4j/2.0/config">
  <Appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
    </Console>
  </Appenders>
  <Loggers>
    <Root level="error">
      <AppenderRef ref="Console" />
    </Root>
  </Loggers>
</Configuration>
{code}


> Support of XSD/DTD linked to the configuration file
> ---------------------------------------------------
>
>                 Key: LOG4J2-411
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-411
>             Project: Log4j 2
>          Issue Type: Wish
>          Components: Configurators
>    Affects Versions: 2.0-beta9
>         Environment: Windows - OracleJDK 7/Linux - OpenJDK 7
>            Reporter: Ladislav Jech
>            Priority: Minor
>              Labels: features
>
> It might be good idea to include and XSD reference inside of the xml configuration file in a way as Maven does in pom.xml file, so the user can use IDE suggestions (like Netbeans can do) to configure the logging system.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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