Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-556

support groovy configuration in Context Selectors

    XMLWordPrintable

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 0.9.24
    • logback-classic
    • None

    Description

      Currently logback context selector only supports Joran (XML) configuration. When a groovy file is given an XML parser exception occurs. If the file ends in .groovy, the configuration should use the groovy interpreter instead of the XML Parser.

      INFO | jvm 1 | 2010/08/12 15:27:56 | 15:27:56,063 |-ERROR in ch.qos.logback.core.joran.event.SaxEventRecorder@13eaab - Parsing fatal error on line 1 and column 1

      Here's the relevant part of the stack trace.

      org.xml.sax.SAXParseException: Content is not allowed in prolog.
      ...
      INFO | jvm 1 | 2010/08/12 15:27:56 | at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52)
      INFO | jvm 1 | 2010/08/12 15:27:56 | at at ch.qos.logback.classic.selector.ContextJNDISelector.configureLoggerContextByURL(ContextJNDISelector.java:161)
      INFO | jvm 1 | 2010/08/12 15:27:56 | at at ch.qos.logback.classic.selector.ContextJNDISelector.getLoggerContext(ContextJNDISelector.java:105)
      INFO | jvm 1 | 2010/08/12 15:27:56 | at at org.slf4j.impl.StaticLoggerBinder.getLoggerFactory(StaticLoggerBinder.java:108)
      INFO | jvm 1 | 2010/08/12 15:27:56 | at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:273)
      INFO | jvm 1 | 2010/08/12 15:27:56 | at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)

      Attachments

        Activity

          People

            logback-dev Logback dev list
            seanmceligot Sean McEligot
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: