Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-265

osgi-over-slf4j creates a named logger that includes extra properties

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • None
    • Unspecified
    • None
    • Operating System: Mac OS X 10.3
      Platform: Macintosh

    Description

      Assume bundle having this in MANIFEST.MF:
      Bundle-SymbolicName: org.eclipse.ui.workbench; singleton:=true

      Then in result of
      String name = (String)
      bundle.getHeaders().get(Constants.BUNDLE_SYMBOLICNAME);

      in Equinox 3.7 (Indigo) is incorrect string
      "org.eclipse.ui.workbench; singleton:=true"

      Result of
      bundle.getSymbolicName();

      is this time correct:
      "org.eclipse.ui.workbench"

      Please, do you have same results as me in e.g. Felix (or whatever you
      use)? If so, I fill fix constructor from
      public LogServiceImpl(Bundle bundle)

      { String name = (String) bundle.getHeaders().get( Constants.BUNDLE_SYMBOLICNAME); String version = (String) bundle.getHeaders().get( Constants.BUNDLE_VERSION); delegate = LoggerFactory.getLogger(name + '.' + version); }

      to
      public LogServiceImpl(Bundle bundle)

      { String name = bundle.getSymbolicName(); String version = bundle.getVersion(); delegate = LoggerFactory.getLogger(name + '.' + version); }

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            mattbishop Matt Bishop
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: