Skip to content

Commit

Permalink
Fix debug logging, similar to r148519.
Browse files Browse the repository at this point in the history
Reviewed by: Peter Gal
  • Loading branch information
ossy-szeged committed Jul 18, 2013
1 parent a62e74d commit b8c5bdf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
8 changes: 8 additions & 0 deletions README.nix
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ WEB_PROCESS_CMD_PREFIX="/usr/bin/xterm -title WebProcess -e gdb --args" \
WebKitBuild/Debug/bin/WebKitTestRunner --no-timeout-at-all \
LayoutTests/TEST_OF_YOUR_CHOICE

If you want to have detailed logs from LOG(...) functions you can enable
logging for each log channel with WEBKIT_DEBUG environment variable:
WEBKIT_DEBUG="WTFLogChannel1 WTFLogChannel2 ... WTFLogChannelN"

You can find log channels in Source/WebCore/platform/Logging.cpp and
Source/WebKit2/Platform/Logging.cpp. For example: Frames, Events, Network, ...


Using the remote inspector
==========================

Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit2/Platform/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ WTFLogChannel LogNetwork = { 0x00000080, "WebKit2LogLevel", WTFLogChan
WTFLogChannel LogNetworkScheduling = { 0x00000100, "WebKit2LogLevel", WTFLogChannelOff };
WTFLogChannel LogInspectorServer = { 0x00000200, "WebKit2LogLevel", WTFLogChannelOff };

#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL)
#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL) && !PLATFORM(NIX)
void initializeLogChannel(WTFLogChannel* channel)
{
// FIXME: Each platform will need to define their own initializeLogChannel().
}
#endif

#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(NIX)
WTFLogChannel* getChannelFromName(const String& channelName)
{
if (!(channelName.length() >= 2))
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit2/Platform/Logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern WTFLogChannel LogNetworkScheduling;

void initializeLogChannel(WTFLogChannel*);
void initializeLogChannelsIfNecessary(void);
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(NIX)
WTFLogChannel* getChannelFromName(const String& channelName);
#endif

Expand Down
1 change: 1 addition & 0 deletions Source/WebKit2/PlatformNix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ list(APPEND WebKit2_LINK_FLAGS

list(APPEND WebKit2_SOURCES
Platform/gtk/ModuleGtk.cpp
Platform/gtk/LoggingGtk.cpp
Platform/gtk/WorkQueueGtk.cpp
Platform/unix/SharedMemoryUnix.cpp

Expand Down
8 changes: 2 additions & 6 deletions Source/WebKit2/WebProcess/nix/WebProcessMainNix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
#endif

#include "WKBase.h"
#include "WebKit2Initialize.h"
#include <WebCore/CoordinatedGraphicsLayer.h>
#include <WebCore/ResourceHandle.h>
#include <WebCore/RunLoop.h>
#include <WebKit2/WebProcess.h>
#include <runtime/InitializeThreading.h>
#include <unistd.h>
#include <wtf/MainThread.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>

Expand All @@ -60,10 +59,7 @@ WK_EXPORT int WebProcessMainNix(int argc, char* argv[])
#endif
#endif

JSC::initializeThreading();
WTF::initializeMainThread();

RunLoop::initializeMainRunLoop();
InitializeWebKit2();

#ifdef WTF_USE_SOUP
SoupSession* session = WebCore::ResourceHandle::defaultSession();
Expand Down

0 comments on commit b8c5bdf

Please sign in to comment.