Title: [258754] trunk/Source/WebCore
Revision
258754
Author
[email protected]
Date
2020-03-20 02:01:04 -0700 (Fri, 20 Mar 2020)

Log Message

[Unix] Allow runtime release logging levels configuration
https://bugs.webkit.org/show_bug.cgi?id=209286

Reviewed by Adrian Perez de Castro.

Setting to a comma-separated list like in this example should now work as expected:

WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...

* platform/unix/LoggingUnix.cpp:
(WebCore::logLevelString):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (258753 => 258754)


--- trunk/Source/WebCore/ChangeLog	2020-03-20 06:03:34 UTC (rev 258753)
+++ trunk/Source/WebCore/ChangeLog	2020-03-20 09:01:04 UTC (rev 258754)
@@ -1,3 +1,17 @@
+2020-03-20  Philippe Normand  <[email protected]>
+
+        [Unix] Allow runtime release logging levels configuration
+        https://bugs.webkit.org/show_bug.cgi?id=209286
+
+        Reviewed by Adrian Perez de Castro.
+
+        Setting to a comma-separated list like in this example should now work as expected:
+
+        WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...
+
+        * platform/unix/LoggingUnix.cpp:
+        (WebCore::logLevelString):
+
 2020-03-19  Simon Fraser  <[email protected]>
 
         Some scroll snapping tests are still flaky

Modified: trunk/Source/WebCore/platform/unix/LoggingUnix.cpp (258753 => 258754)


--- trunk/Source/WebCore/platform/unix/LoggingUnix.cpp	2020-03-20 06:03:34 UTC (rev 258753)
+++ trunk/Source/WebCore/platform/unix/LoggingUnix.cpp	2020-03-20 09:01:04 UTC (rev 258754)
@@ -31,21 +31,17 @@
 
 String logLevelString()
 {
-#if !LOG_DISABLED
     char* logEnv = getenv("WEBKIT_DEBUG");
     if (!logEnv)
         return emptyString();
 
     // We set up the logs anyway because some of our logging, such as Soup's is available in release builds.
-#if defined(NDEBUG)
+#if defined(NDEBUG) && RELEASE_LOG_DISABLED
     WTFLogAlways("WEBKIT_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build.");
 #endif
 
     // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1.
-    return String("NotYetImplemented,") + logEnv;
-#else
-    return String();
-#endif
+    return makeString("NotYetImplemented,"_s, logEnv);
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to