Skip to content

Commit 0de4000

Browse files
committed
logging fixes
1 parent 71e629d commit 0de4000

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

Source/WTF/wtf/Assertions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ typedef struct {
182182
#define LOG_CHANNEL_WEBKIT_SUBSYSTEM "WPEWebKit"
183183
#elif PLATFORM(PLAYSTATION)
184184
#define LOG_CHANNEL_WEBKIT_SUBSYSTEM "SceNKWebKit"
185+
#elif PLATFORM(QT)
186+
#define LOG_CHANNEL_WEBKIT_SUBSYSTEM "QtWebKit"
185187
#else
186188
#define LOG_CHANNEL_WEBKIT_SUBSYSTEM "com.apple.WebKit"
187189
#endif

Source/WebCore/platform/qt/LoggingQt.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020

2121
#include "config.h"
22-
#include "Logging.h"
22+
#include "LogInitialization.h"
2323

2424
#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
2525

@@ -34,15 +34,9 @@ String logLevelString()
3434
if (loggingEnv.isEmpty())
3535
return emptyString();
3636

37-
#if defined(NDEBUG)
38-
qWarning("This is a release build. Setting QT_WEBKIT_LOG will have no effect.");
39-
#else
40-
41-
// To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1.
42-
return String(QStringLiteral("NotYetImplemented,").append(QLatin1String(loggingEnv.constData())));
43-
#endif
37+
return String::fromLatin1(loggingEnv.constData());
4438
}
4539

4640
} // namespace WebCore
4741

48-
#endif // !LOG_DISABLED
42+
#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED

Source/WebKitLegacy/qt/WebCoreSupport/InitWebCoreQt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Q_DECL_EXPORT void initializeWebCoreQt()
8383
if (initialized)
8484
return;
8585

86-
#if !LOG_DISABLED
86+
#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
8787
WebCore::logChannels().initializeLogChannelsIfNecessary();
88-
#endif // !LOG_DISABLED
88+
#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
8989
JSC::initialize();
9090
WTF::initializeMainThread();
9191
WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);

0 commit comments

Comments
 (0)