Changeset 63901 in webkit


Ignore:
Timestamp:
Jul 22, 2010 10:48:36 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-22 Joone Hur <joone.hur@samsung.com>

Reviewed by Antonio Gomes.

[EFL] add support for logging
https://bugs.webkit.org/show_bug.cgi?id=40807

Enable to turn log channels on for EFL port

  • platform/efl/LoggingEfl.cpp: (WebCore::InitializeLoggingChannelsIfNecessary):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63898 r63901  
     12010-07-22  Joone Hur  <joone.hur@samsung.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [EFL] add support for logging
     6        https://bugs.webkit.org/show_bug.cgi?id=40807
     7
     8        Enable to turn log channels on for EFL port
     9
     10        * platform/efl/LoggingEfl.cpp:
     11        (WebCore::InitializeLoggingChannelsIfNecessary):
     12
    1132010-07-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
    214
  • trunk/WebCore/platform/efl/LoggingEfl.cpp

    r55342 r63901  
    2424#include "Logging.h"
    2525
     26#include "PlatformString.h"
     27#include <Eina.h>
     28
    2629namespace WebCore {
    2730
    2831void InitializeLoggingChannelsIfNecessary()
    2932{
     33    static bool didInitializeLoggingChannels = false;
     34    if (didInitializeLoggingChannels)
     35        return;
     36
     37    didInitializeLoggingChannels = true;
     38
     39    char* logEnv = getenv("WEBKIT_DEBUG");
     40    if (!logEnv)
     41        return;
     42
     43#if defined(NDEBUG)
     44    EINA_LOG_WARN("WEBKIT_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build.");
     45#endif
     46
     47    char** logv = eina_str_split(logEnv, ",", -1);
     48
     49    EINA_SAFETY_ON_NULL_RETURN(logv);
     50
     51    for (int i = 0; logv[i]; i++) {
     52        if (WTFLogChannel* channel = getChannelFromName(logv[i]))
     53            channel->state = WTFLogChannelOn;
     54    }
     55
     56    free(*logv);
     57    free(logv);
     58
     59    // To disable logging notImplemented set the DISABLE_NI_WARNING
     60    // environment variable to 1.
    3061    LogNotYetImplemented.state = WTFLogChannelOn;
    3162}
Note: See TracChangeset for help on using the changeset viewer.