glassfish
  1. glassfish
  2. GLASSFISH-19448

Cannot get the logs details to be displayed in the admin console logviewer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b67_ms7
    • Fix Version/s: 4.0_b71
    • Component/s: logging
    • Labels:
      None

      Description

      The admin console uses the following REST endpoint to get the list of logs to be displayed in the log viewer.

      http://localhost:4848/management/domain/view-log/details.json

      However, this is now returning FAILURE as the status.
      Debugging the code shows that the following lines is throwing the exception.

      private String getWithType(
                  String logFileName,
                  long startIndex,
                  boolean searchForward,
                  int maximumNumberOfResults,
                  long fromTime,
                  long toTime,
                  String logLevel, boolean onlyLevel, String anySearch, List<String> listOfModules,
                  String instanceName,
                  String type) throws IOException {
              if (habitat.getService(LogManager.class) == null) {
                  //the logger service is not install, so we cannot rely on it.
                  //return an error
                  throw new IOException("The GlassFish LogManager Service is not available. Not installed?");
              }
      

      The REST endpoint should return something like this:

      {"records": [{"recordNumber":337,"loggedDateTimeInMS":1355531068978,"loggedLevel":"WARNING","productName":"glassfish3.1.2","loggerName":"org.apache.catalina.connector.Request","nameValuePairs":"_ThreadID=51;_ThreadName=Thread-2;","messageID":"PWC4011","Message":" Unable to set request character encoding to UTF-8 from context , because request parameters have already been read, or ServletRequest.getReader() has already been called"},{"recordNumber":336,"loggedDateTimeInMS":1355531051885,"loggedLevel":"WARNING","productName":"glassfish3.1.2","loggerName":"org.apache.catalina.connector.Request","nameValuePairs":"_ThreadID=80;_ThreadName=Thread-2;","messageID":"PWC4011","Message":" Unable to set request character encoding to UTF-8 from context , because request parameters have already been read, or ServletRequest.getReader() has already been called"}
      
      

      Since we still need to support the old format, so the current resource to get the logs have to work like before.

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: