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

Color support and OSGi

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.2.3
    • logback-classic
    • Equinox OSGi environment running on Windows 10 Pro 64bit.

      Logback: 1.2.3

      Jansi: 1.16

    Description

      The following exception is thrown when "<withJansi>true</withJansi>" is used with  ConsoleAppender on Windows (full stack trace in attached log file):

       

      16:39:40,801 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create WindowsAnsiOutputStream. Falling back on the default stream. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
      at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
      at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69)

      ...

      Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream cannot be found by ch.qos.logback.classic_1.2.3
      at at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
      at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
      at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
      at at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
      at at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56)
      at ... 49 common frames omitted

      the jansi library correctly exports this package and logback-core correctly imports the same package.

      It seems that the following entry is missing in logback-classic's MANIFEST.MF file:

      org.fusesource.jansi; resolution:=optional; version="[1.9, 2)"

      Attachments

        Activity

          People

            logback-dev Logback dev list
            a.facciorusso Antonio Facciorusso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: