[Webkit-unassigned] [Bug 24264] GTK+ port needs proper logging
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 1 07:10:18 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=24264
------- Comment #2 from zecke at selfish.org 2009-03-01 07:10 PDT -------
(From update of attachment 28126)
> +#include <glib.h>
> +#include <string.h>
> +
> namespace WebCore {
>
> +// Inspired by the code used by the Qt port
> +
> +static WTFLogChannel* getChannelFromName(const char* channelName)
> +{
> + if (!strlen(channelName) >= 2)
> + return 0;
aeh? if !strlen() >= 2? to be honest even if the semantic is like !(strlen() <=
2) you might be better of with just a if (strlen() < 3) return 0;
> +
> + if (!g_ascii_strcasecmp(channelName, "BackForward")) return &LogBackForward;
You will have to turn these into a new line.
> - // FIXME: Add a way for the user to specify which
> - // logs he/she would like turned on.
> + static bool haveInitializedLoggingChannels = false;
> + if (haveInitializedLoggingChannels)
> + return;
> +
> + haveInitializedLoggingChannels = true;
okay, I think it has to be hasIniti...
;
> +
> + // to disable logging notImplemented set the DISABLE_NI_WARNING
> + // environment variable to 1
> LogNotYetImplemented.state = WTFLogChannelOn;
> - const char* webkit_debug = g_getenv("WEBKIT_DEBUG");
> if (!soup_session_get_feature(session, SOUP_TYPE_LOGGER)
> - && webkit_debug && !strcmp(webkit_debug, "network")) {
> + && (LogNetwork.state == WTFLogChannelOn)) {
I think you can omit the () here..
>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list