You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/01/19 22:44:43 UTC

[GitHub] [solr] madrob commented on a change in pull request #542: SOLR-14142 Log in Solr's log whether request logging is enabled

madrob commented on a change in pull request #542:
URL: https://github.com/apache/solr/pull/542#discussion_r788207977



##########
File path: solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java
##########
@@ -187,4 +187,19 @@ public static String getLogLevelString() {
     else if (rootLogger.isErrorEnabled()) return "ERROR";
     else return "INFO";
   }
+
+  /**
+   * Check whether Jetty requestlogging is enabled and log info about it
+   */
+  public static void checkRequestLogging() {
+    boolean requestLogEnabled = System.getProperty("sun.java.command", "").contains("module=requestlog");

Review comment:
       If we are executing somewhere that has access to the `Server` object (like the tests `JettySolrRunner`) then we can check if `server.getRequestLog()` returns null. I haven't figured out how to get access to our server object outside of that though. This is what I get when looking at who has a reference to the Server object and none of those seem particularly approachable.
   
   <img width="580" alt="image" src="https://user-images.githubusercontent.com/1592330/150230472-4e79680f-255c-4fa8-ac24-89d46a87cc33.png">
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org