+2012-01-14 Adam Treat <atreat@rim.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=76339
+
+ Take a page from the Gtk and Qt ports and quiet these logs unless they
+ are explicitly enabled via environment variable.
+
+ Reviewed by George Staikos.
+
+ * platform/blackberry/LoggingBlackBerry.cpp:
+ (WebCore::initializeLoggingChannelsIfNecessary):
+
2011-11-09 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: outline-color-applies-to* tests fail
#include "config.h"
#include "Logging.h"
+#include <wtf/text/WTFString.h>
+
namespace WebCore {
static inline void initializeWithUserDefault(WTFLogChannel& channel, bool enabled)
return;
haveInitializedLoggingChannels = true;
- initializeWithUserDefault(LogNotYetImplemented, true);
- initializeWithUserDefault(LogFrames, true);
- initializeWithUserDefault(LogLoading, true);
- initializeWithUserDefault(LogPopupBlocking, true);
- initializeWithUserDefault(LogEvents, true);
- initializeWithUserDefault(LogEditing, true);
- initializeWithUserDefault(LogLiveConnect, true);
- initializeWithUserDefault(LogIconDatabase, false);
- initializeWithUserDefault(LogSQLDatabase, false);
- initializeWithUserDefault(LogSpellingAndGrammar, true);
- initializeWithUserDefault(LogBackForward, true);
- initializeWithUserDefault(LogHistory, true);
- initializeWithUserDefault(LogPageCache, true);
- initializeWithUserDefault(LogPlatformLeaks, true);
- initializeWithUserDefault(LogNetwork, true);
- initializeWithUserDefault(LogFTP, true);
- initializeWithUserDefault(LogThreading, true);
- initializeWithUserDefault(LogStorageAPI, true);
- initializeWithUserDefault(LogMedia, true);
- initializeWithUserDefault(LogPlugins, true);
- initializeWithUserDefault(LogArchives, true);
- initializeWithUserDefault(LogProgress, false);
- initializeWithUserDefault(LogResourceLoading, false);
- initializeWithUserDefault(LogFileAPI, true);
+ String logEnv = getenv("WEBKIT_DEBUG");
+ if (logEnv.isEmpty())
+ return;
+
+ Vector<String> logv;
+ logEnv.split(" ", logv);
+
+ Vector<String>::const_iterator it = logv.begin();
+ for (; it != logv.end(); ++it) {
+ if (WTFLogChannel* channel = getChannelFromName(*it))
+ channel->state = WTFLogChannelOn;
+ }
}
} // namespace WebCore