Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-624

Extract Logger Categories to a separate interface

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0-beta-1
    • 3.0-beta-1
    • general
    • None

    Description

      If the logger names could be extracted to constants in an interface,
      then it will be easier to make changes to logger names and will also
      lead to lesser errors , because logger names are case sensitive

      So for example, instead of obtaining a logger like

      public static final Logger logger =
      Logger.getInstance("OpenEJB.startup",
      Assembler.class.getPackage().getName());

      We could do something like

      public static final Logger logger =
      Logger.getInstance(LogCategory.OPENEJB_STARTUP,
      Assembler.class.getPackage().getName());

      In fact, with static import it will just be

      public static final Logger logger =
      Logger.getInstance(OPENEJB_STARTUP,
      Assembler.class.getPackage().getName());

      LogCategory would contain the names of all loggers used in openejb.
      Since there are just a few loggers, they could be defined within the
      Logger class itself.

      Attachments

        1. openejb-624.patch
          48 kB
          karan singh malhi

        Activity

          People

            karan_malhi karan singh malhi
            karan_malhi karan singh malhi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: