glassfish
  1. glassfish
  2. GLASSFISH-15777

Introduce in the admin console a server.log syntax string

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1_b40
    • Fix Version/s: 4.1
    • Component/s: logging
    • Labels:
      None

      Description

      It would be very convenient if the Glassfish admin could define the server.log output strings.
      Today the strings are just too long to be practical and having the possibility to define the syntax could really make the server.log output more useful!

        Activity

        Hide
        Tom Mueller added a comment -

        I'm not sure why this feature would be coupled to the admin console. There could be an interface to set a log format string in the console, but presumably there would also be an interface to set the format string via the asadmin command or by editing a config file.

        Also, I'm assuming that the desire here is to be able to edit the format of all log messages, i.e., the timestamp, module, level, etc. parts rather than the actual messages themselves. Given this, I'm putting this in the logging category.

        Show
        Tom Mueller added a comment - I'm not sure why this feature would be coupled to the admin console. There could be an interface to set a log format string in the console, but presumably there would also be an interface to set the format string via the asadmin command or by editing a config file. Also, I'm assuming that the desire here is to be able to edit the format of all log messages, i.e., the timestamp, module, level, etc. parts rather than the actual messages themselves. Given this, I'm putting this in the logging category.
        Hide
        stephanj added a comment -

        As long as we can change the log messages syntax, that would be really helpful. Thx!

        Show
        stephanj added a comment - As long as we can change the log messages syntax, that would be really helpful. Thx!
        Hide
        stephanj added a comment - - edited

        For example I'd like to change the following log output :

        [#|2011-02-01T16:12:50.288+0100|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=311;_ThreadName=Thread-5;|[2011-02-01 16:12:50,288] INFO org.quartz.simpl.RAMJobStore RAMJobStore initialized.

        #]

        to

        16:12:50 | INFO | org.quartz.simpl.RAMJobStore RAMJobStore initialized.

        which when scanning the server.log would be a lot more user friendly!

        Show
        stephanj added a comment - - edited For example I'd like to change the following log output : [#|2011-02-01T16:12:50.288+0100|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=311;_ThreadName=Thread-5;| [2011-02-01 16:12:50,288] INFO org.quartz.simpl.RAMJobStore RAMJobStore initialized. #] to 16:12:50 | INFO | org.quartz.simpl.RAMJobStore RAMJobStore initialized. which when scanning the server.log would be a lot more user friendly!
        Hide
        naman_mehta added a comment -

        There is no provision right now to change the logging format as on today.

        It used default format provided in 3.0: http://wikis.sun.com/display/glassfish/GlassFishV3LoggingMessageFormat

        We can plan to consider the same in next release.

        Show
        naman_mehta added a comment - There is no provision right now to change the logging format as on today. It used default format provided in 3.0: http://wikis.sun.com/display/glassfish/GlassFishV3LoggingMessageFormat We can plan to consider the same in next release.
        Hide
        naman_mehta added a comment -

        If we provide this kind of provision then there are multiple issues.

        Example:
        1. User has used default setting and according to that data is logged under server.log file.
        2. Now after sometime user has changed logging format setting to something else.

        So if you open the server.log file there are set of the records with different format. Some records with default format and some with new format.

        Now when user uses admin console to view log records using 'Log Viewer', it will fail there because of different log records format in the same server.log file. Parsing of the record is failing there. Back end code is not aware of the old format and tried to format old log records with new format setting and fails there.

        Also in 'Log Viewer' screen there are advanced search options to filter log records. If user had changed the log record format completely then it might also fail there.

        Need your opinion on the same.

        Show
        naman_mehta added a comment - If we provide this kind of provision then there are multiple issues. Example: 1. User has used default setting and according to that data is logged under server.log file. 2. Now after sometime user has changed logging format setting to something else. So if you open the server.log file there are set of the records with different format. Some records with default format and some with new format. Now when user uses admin console to view log records using 'Log Viewer', it will fail there because of different log records format in the same server.log file. Parsing of the record is failing there. Back end code is not aware of the old format and tried to format old log records with new format setting and fails there. Also in 'Log Viewer' screen there are advanced search options to filter log records. If user had changed the log record format completely then it might also fail there. Need your opinion on the same.
        Hide
        rajendra_inamdar added a comment -

        The default log format will change to ODL format, which will support selecting certain fields to be included in the logged record. It will mitigate the need for this enhancement.

        Show
        rajendra_inamdar added a comment - The default log format will change to ODL format, which will support selecting certain fields to be included in the logged record. It will mitigate the need for this enhancement.
        Hide
        rajendra_inamdar added a comment -

        As noted by Naman above, allowing arbitrary change to the log format is risky since it will interfere with log parsing/viewing capabilities.

        Show
        rajendra_inamdar added a comment - As noted by Naman above, allowing arbitrary change to the log format is risky since it will interfere with log parsing/viewing capabilities.

          People

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

            Dates

            • Created:
              Updated: