summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/wx/LoggingWx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/wx/LoggingWx.cpp')
-rw-r--r--WebCore/platform/wx/LoggingWx.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/WebCore/platform/wx/LoggingWx.cpp b/WebCore/platform/wx/LoggingWx.cpp
index 006712c..4d8a437 100644
--- a/WebCore/platform/wx/LoggingWx.cpp
+++ b/WebCore/platform/wx/LoggingWx.cpp
@@ -26,11 +26,39 @@
#include "config.h"
#include "Logging.h"
+#include "CString.h"
+#include "PlatformString.h"
+#include <wtf/Vector.h>
+
+#include <wx/defs.h>
+#include <wx/utils.h>
+
namespace WebCore {
void InitializeLoggingChannelsIfNecessary()
{
- LogNotYetImplemented.state = WTFLogChannelOn;
+ static bool haveInitializedLoggingChannels = false;
+ if (haveInitializedLoggingChannels)
+ return;
+
+ haveInitializedLoggingChannels = true;
+
+ wxString loggingEnv;
+ wxGetEnv(wxT("WX_WEBKIT_LOG"), &loggingEnv);
+ if (loggingEnv == wxEmptyString)
+ return;
+
+ String wkLoggingEnv = loggingEnv;
+ Vector<String> logs;
+
+ wkLoggingEnv.split(",", logs);
+
+ for (size_t i = 0; i < logs.size(); ++i) {
+ WTFLogChannel* channel = getChannelFromName(logs[i]);
+
+ if (channel)
+ channel->state = WTFLogChannelOn;
+ }
}
}