glassfish
  1. glassfish
  2. GLASSFISH-18522

server.log has 44.0 as what looks like the product name and version

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_b68_EE7MS3
    • Component/s: logging
    • Labels:
      None

      Description

      I noticed in 4.0 server.log, it has 44.0 as what looks like the product
      name and version, for example,

      [#|2012-03-12T15:01:43.931-0400|INFO|44.0|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=18;_ThreadName=Thread-2;|JMX002:
      JMXStartupService: Stopped JMXConnectorServer: null|#]

      whereas in 3.1.2, the same column has glassfish3.1.2:

      [#|2012-03-12T14:22:07.444+0000|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=13;_ThreadName=Thread-2;|Grizzly
      Framework 1.9.46 started in: 43ms - bound to [0.0.0.0:3700]|#]

      I usually look at this column to see which version of glassfish the log
      belongs to. Any idea why 44.0, instead of 4.0 or glassfish4.0?

        Activity

        Hide
        sandeep.shrivastava added a comment -

        This should be fixed with r57727.

        Show
        sandeep.shrivastava added a comment - This should be fixed with r57727.
        Hide
        sandeep.shrivastava added a comment -

        In the prior release the version field used to be glassfish3.1.2, see log record example below.

        [#|2012-12-18T12:28:42.036-0500|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=43;_ThreadName=Thread-2;|JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://adc6260176.us.oracle.com:8686/jndi/rmi://adc6260176.us.oracle.com:8686/jmxrmi|#]

        The code in the UniformLogFormatter which build the string is as follows:

        protected String getProductId()

        { String version = Version.getAbbreviatedVersion() + Version.getVersionPrefix() + Version.getMajorVersion() + "." + Version.getMinorVersion(); return (version); }

        In the Version class, the abbreviated version is being returned as the major version, hence the major version is repeated twice.

        /**

        • Returns abbreviated version.
          */
          public static String getAbbreviatedVersion() { return getMajorVersion(); }

        The UniformLogFormatter can instead call the Version.getAbbrevProductName() method.

        Index: src/main/java/com/sun/enterprise/server/logging/UniformLogFormatter.java
        ===================================================================
        — src/main/java/com/sun/enterprise/server/logging/UniformLogFormatter.java (revision 57623)
        +++ src/main/java/com/sun/enterprise/server/logging/UniformLogFormatter.java (working copy)
        @@ -177,7 +177,7 @@
        */
        protected String getProductId()

        { - String version = Version.getAbbreviatedVersion() + Version.getVersionPrefix() + + String version = Version.getAbbrevProductName() + Version.getVersionPrefix() + Version.getMajorVersion() + "." + Version.getMinorVersion(); return (version); }

        With the fix the log record appears as the following:

        [#|2012-12-18T12:50:53.335-0500|INFO|glassfish4.0|javax.enterprise.system.jmx|_ThreadID=29;_ThreadName=Thread-5;_TimeMillis=1355853053335;_LevelValue=800;_MessageID=AS-JMX-00005;|JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://adc6260176.us.oracle.com:8686/jndi/rmi://adc6260176.us.oracle.com:8686/jmxrmi|#]

        Show
        sandeep.shrivastava added a comment - In the prior release the version field used to be glassfish3.1.2, see log record example below. [#|2012-12-18T12:28:42.036-0500|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=43;_ThreadName=Thread-2;|JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://adc6260176.us.oracle.com:8686/jndi/rmi://adc6260176.us.oracle.com:8686/jmxrmi|#] The code in the UniformLogFormatter which build the string is as follows: protected String getProductId() { String version = Version.getAbbreviatedVersion() + Version.getVersionPrefix() + Version.getMajorVersion() + "." + Version.getMinorVersion(); return (version); } In the Version class, the abbreviated version is being returned as the major version, hence the major version is repeated twice. /** Returns abbreviated version. */ public static String getAbbreviatedVersion() { return getMajorVersion(); } The UniformLogFormatter can instead call the Version.getAbbrevProductName() method. Index: src/main/java/com/sun/enterprise/server/logging/UniformLogFormatter.java =================================================================== — src/main/java/com/sun/enterprise/server/logging/UniformLogFormatter.java (revision 57623) +++ src/main/java/com/sun/enterprise/server/logging/UniformLogFormatter.java (working copy) @@ -177,7 +177,7 @@ */ protected String getProductId() { - String version = Version.getAbbreviatedVersion() + Version.getVersionPrefix() + + String version = Version.getAbbrevProductName() + Version.getVersionPrefix() + Version.getMajorVersion() + "." + Version.getMinorVersion(); return (version); } With the fix the log record appears as the following: [#|2012-12-18T12:50:53.335-0500|INFO|glassfish4.0|javax.enterprise.system.jmx|_ThreadID=29;_ThreadName=Thread-5;_TimeMillis=1355853053335;_LevelValue=800;_MessageID=AS-JMX-00005;|JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://adc6260176.us.oracle.com:8686/jndi/rmi://adc6260176.us.oracle.com:8686/jmxrmi|#]
        Hide
        Joe Di Pol added a comment -

        re-assigning to logging

        Show
        Joe Di Pol added a comment - re-assigning to logging

          People

          • Assignee:
            sandeep.shrivastava
            Reporter:
            Cheng Fang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: