Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1_b12
    • Fix Version/s: None
    • Component/s: logging
    • Labels:
      None
    • Environment:

      Solaris 10 SPARC

      Description

      The custom logger doesn't working.
      How simulate: Please deploy application logtest (please see attachment). In index.jsp there are following scriptlets:
      <%
      Logger logger=Logger.getLogger("logtest");
      %>
      <%logger.fine("Test log");%>

      Now, you add custom logger (via Admin console: Configurations->

      {config}

      >Logger Settings>Module Log Levels->Log Levels). Please use "Add logger" button and fill "logtest" value to "Logger name" and "FINE" value to "level". Use "Save" button.
      Launch the web application "logtest" (index.jsp is welcome page). In server.log there isn't message "Test log", altough custom logger "logtest" is configured to "FINE" level.

        Activity

        janouskovec created issue -
        Hide
        Tom Mueller added a comment -

        Reassigning to the logging category.

        Show
        Tom Mueller added a comment - Reassigning to the logging category.
        Tom Mueller made changes -
        Field Original Value New Value
        Assignee Tom Mueller [ tmueller ] naman_mehta [ naman_mehta ]
        Component/s logging [ 10608 ]
        Component/s configuration [ 10593 ]
        Hide
        naman_mehta added a comment -

        I will plan to verify the same but scrubbing as 3.1.2 exclude now. If needed will plan to fix in 3.1.2.

        Show
        naman_mehta added a comment - I will plan to verify the same but scrubbing as 3.1.2 exclude now. If needed will plan to fix in 3.1.2.
        naman_mehta made changes -
        Tags 3_1_2_exclude
        Hide
        janouskovec added a comment -

        I tried it on GF 3.1.2 b17. Same behaviour on this version. If is possible, please plan to fix in 3.1.2, because issue is really critical. In fact, cannot switch to another loging level than INFO for all application and many system components (for example cannot set level FINE for ShoalLogger).

        Show
        janouskovec added a comment - I tried it on GF 3.1.2 b17. Same behaviour on this version. If is possible, please plan to fix in 3.1.2, because issue is really critical. In fact, cannot switch to another loging level than INFO for all application and many system components (for example cannot set level FINE for ShoalLogger).
        Joe Di Pol made changes -
        Tags 3_1_2_exclude 3_1_2-exclude 3_1_2_exclude
        Joe Di Pol made changes -
        Tags 3_1_2-exclude 3_1_2_exclude 3_1_2-exclude
        Hide
        naman_mehta added a comment - - edited

        Java Logger is creating weak reference logger so when it's not referred it's removing the same. Now when your app is trying to use getLogger, it's creating new logger with parent log levels (which is INFO) so above app is not working.

        I created strong logger reference in log manager service and updating every time when log level changes so it's not removing loggers now. So getLogger now returns existing logger only.

        • What is the impact on the customer of the bug?
          It's highly impact and visible bug
        • How likely is it that a customer will see the bug and how serious is the bug?
          When ever custom logger is created and reference is removed it's failing to log messages.
        • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
          No
        • What is the cost/risk of fixing the bug?
          It's not going to impact other functionality as I am just adding strong reference so JUL not remove any loggers.
        • How risky is the fix? How much work is the fix? Is the fix complicated?
          Investigation of this bug took much time but fix is straight forward.
        • Is there an impact on documentation or message strings?
          No.
        • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
          You can run same app attached in this bug to verify the same.
        • Which is the targeted build of 3.1.2 for this fix?
          3.1.2 b19
        Show
        naman_mehta added a comment - - edited Java Logger is creating weak reference logger so when it's not referred it's removing the same. Now when your app is trying to use getLogger, it's creating new logger with parent log levels (which is INFO) so above app is not working. I created strong logger reference in log manager service and updating every time when log level changes so it's not removing loggers now. So getLogger now returns existing logger only. What is the impact on the customer of the bug? It's highly impact and visible bug How likely is it that a customer will see the bug and how serious is the bug? When ever custom logger is created and reference is removed it's failing to log messages. Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)? No What is the cost/risk of fixing the bug? It's not going to impact other functionality as I am just adding strong reference so JUL not remove any loggers. How risky is the fix? How much work is the fix? Is the fix complicated? Investigation of this bug took much time but fix is straight forward. Is there an impact on documentation or message strings? No. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? You can run same app attached in this bug to verify the same. Which is the targeted build of 3.1.2 for this fix? 3.1.2 b19
        naman_mehta made changes -
        Tags 3_1_2-exclude 3_1_2-review
        Hide
        naman_mehta added a comment -

        Attached file diff for given fix.

        Show
        naman_mehta added a comment - Attached file diff for given fix.
        naman_mehta made changes -
        Attachment diff.log [ 49133 ]
        Joe Di Pol made changes -
        Tags 3_1_2-review 3_1_2-exclude
        Hide
        naman_mehta added a comment -

        Right now fixed for 4.0.

        Project: glassfish
        Repository: svn
        Revision: 52370
        Author: naman_mehta
        Date: 2012-02-01 06:26:48 UTC

        Need to fix on 3.1.2 later.

        Show
        naman_mehta added a comment - Right now fixed for 4.0. Project: glassfish Repository: svn Revision: 52370 Author: naman_mehta Date: 2012-02-01 06:26:48 UTC Need to fix on 3.1.2 later.
        Hide
        janouskovec added a comment -

        Let me know, please, when you plan to fix this bug in 3.1.2.

        Show
        janouskovec added a comment - Let me know, please, when you plan to fix this bug in 3.1.2.
        Hide
        naman_mehta added a comment -

        I already fixed the same for 4.0. If 3.1.2 branch is open to check-in then I am ready to fix it immediately. Let me know.

        Show
        naman_mehta added a comment - I already fixed the same for 4.0. If 3.1.2 branch is open to check-in then I am ready to fix it immediately. Let me know.
        naman_mehta made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            naman_mehta
            Reporter:
            janouskovec
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: