<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>63395</bug_id>
          
          <creation_ts>2011-06-26 02:03:23 -0700</creation_ts>
          <short_desc>[WebKit2] Add logging initialization for WebProcess</short_desc>
          <delta_ts>2013-03-16 22:52:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Lukasz Slachciak">l.slachciak</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>cshu</cc>
    
    <cc>eric</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>sam</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>427494</commentid>
    <comment_count>0</comment_count>
    <who name="Lukasz Slachciak">l.slachciak</who>
    <bug_when>2011-06-26 02:03:23 -0700</bug_when>
    <thetext>Logging initialization was added for WebProcess. Similar initialization is already done for UIProcess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>427495</commentid>
    <comment_count>1</comment_count>
      <attachid>98619</attachid>
    <who name="Lukasz Slachciak">l.slachciak</who>
    <bug_when>2011-06-26 02:08:23 -0700</bug_when>
    <thetext>Created attachment 98619
Patch for logging initialization for WebProcess</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>428056</commentid>
    <comment_count>2</comment_count>
      <attachid>98619</attachid>
    <who name="Leandro Pereira">leandro</who>
    <bug_when>2011-06-27 10:23:56 -0700</bug_when>
    <thetext>Comment on attachment 98619
Patch for logging initialization for WebProcess

View in context: https://bugs.webkit.org/attachment.cgi?id=98619&amp;action=review

&gt; Source/WebKit2/ChangeLog:8
&gt; +        Logging initialization was added for WebProcess. Similar initialization is already done for UIProcess.

Watch out for 80-column limit on changelogs.

&gt; Source/WebKit2/WebProcess/WebProcess.cpp:143
&gt; +#if !LOG_DISABLED

I haven&apos;t seen this idiom lately on WebKit -- wouldn&apos;t it be better if it were an ENABLE(LOGGING) macro call?

&gt; Source/WebKit2/WebProcess/WebProcess.cpp:147
&gt; +    WebKit::initializeLogChannelsIfNecessary();
&gt; +#endif
&gt;  
&gt;      WebCore::InitializeLoggingChannelsIfNecessary();

A couple of questions here:

1) Shouldn&apos;t the LOG_DISABLED macro also disable WebCore&apos;s initialization?
2) Why are WebKit&apos;s and WebCore&apos;s log channel initialization functions are named differently (&apos;Log&apos; vs. &apos;Logging&apos;)?
3) Also, unrelated to this patch, looks like WebCore&apos;s method is wrongly named (begins with a capital letter).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>430240</commentid>
    <comment_count>3</comment_count>
      <attachid>98619</attachid>
    <who name="Lukasz Slachciak">l.slachciak</who>
    <bug_when>2011-06-30 01:03:32 -0700</bug_when>
    <thetext>Comment on attachment 98619
Patch for logging initialization for WebProcess

View in context: https://bugs.webkit.org/attachment.cgi?id=98619&amp;action=review

Leaonardo, I generally agree with you that there is a lot of logging inconsistency in WebKit. There is no ENABLE(LOGGING) feature.
I started some time a go discussion about it: https://lists.webkit.org/pipermail/webkit-dev/2011-June/017278.html
I&apos;m planning to continue to do logging cleanup in WebKit (and propose new patches).
But this what I would like to do in this bug - just to enable logging following current schemes and standard, so I can fully utilize it in WebKit2.

&gt;&gt; Source/WebKit2/ChangeLog:8
&gt;&gt; +        Logging initialization was added for WebProcess. Similar initialization is already done for UIProcess.
&gt; 
&gt; Watch out for 80-column limit on changelogs.

Ok, I&apos;ll fix this

&gt;&gt; Source/WebKit2/WebProcess/WebProcess.cpp:143
&gt;&gt; +#if !LOG_DISABLED
&gt; 
&gt; I haven&apos;t seen this idiom lately on WebKit -- wouldn&apos;t it be better if it were an ENABLE(LOGGING) macro call?

In mac port it is commonly used in Webkit and WebKit2, using ENABLE(LOGGING) would require defining LOGGING feature in Platform.h
in WebCore it is commonly used.
grep -r &quot;\!LOG_DISABLED&quot; Source/ | wc -l
shows me 89 occurences

&gt;&gt; Source/WebKit2/WebProcess/WebProcess.cpp:147
&gt;&gt;      WebCore::InitializeLoggingChannelsIfNecessary();
&gt; 
&gt; A couple of questions here:
&gt; 
&gt; 1) Shouldn&apos;t the LOG_DISABLED macro also disable WebCore&apos;s initialization?
&gt; 2) Why are WebKit&apos;s and WebCore&apos;s log channel initialization functions are named differently (&apos;Log&apos; vs. &apos;Logging&apos;)?
&gt; 3) Also, unrelated to this patch, looks like WebCore&apos;s method is wrongly named (begins with a capital letter).

1) I was following original WebKit2 design as in case of Source/WebKit2/UIProcess/WebContext.cpp
 where WebProcess is initialized - WebKit logging initialization depends on the LOG_DISABLED macro while WebCore logging initialization doesn&apos;t depend on it.
In fact in the Source/WebKit WebCore logging initialization is also not depending on the LOG_DISABLED
2) I think that it was code author&apos;s invention
3) dito</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>430242</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-06-30 01:07:10 -0700</bug_when>
    <thetext>There is no 80c limit in WebKit, for any code or file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>430243</commentid>
    <comment_count>5</comment_count>
      <attachid>98619</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-06-30 01:08:29 -0700</bug_when>
    <thetext>Comment on attachment 98619
Patch for logging initialization for WebProcess

View in context: https://bugs.webkit.org/attachment.cgi?id=98619&amp;action=review

&gt;&gt;&gt; Source/WebKit2/ChangeLog:8
&gt;&gt;&gt; +        Logging initialization was added for WebProcess. Similar initialization is already done for UIProcess.
&gt;&gt; 
&gt;&gt; Watch out for 80-column limit on changelogs.
&gt; 
&gt; Ok, I&apos;ll fix this

This is incorrect advice.

&gt;&gt;&gt; Source/WebKit2/WebProcess/WebProcess.cpp:143
&gt;&gt;&gt; +#if !LOG_DISABLED
&gt;&gt; 
&gt;&gt; I haven&apos;t seen this idiom lately on WebKit -- wouldn&apos;t it be better if it were an ENABLE(LOGGING) macro call?
&gt; 
&gt; In mac port it is commonly used in Webkit and WebKit2, using ENABLE(LOGGING) would require defining LOGGING feature in Platform.h
&gt; in WebCore it is commonly used.
&gt; grep -r &quot;\!LOG_DISABLED&quot; Source/ | wc -l
&gt; shows me 89 occurences

You are correct !LOG_DISABLED Is how the check is written.  The logging code is very old and crufty.  As far as I can tell it&apos;s not used much these days.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>430244</commentid>
    <comment_count>6</comment_count>
      <attachid>99254</attachid>
    <who name="Lukasz Slachciak">l.slachciak</who>
    <bug_when>2011-06-30 01:11:57 -0700</bug_when>
    <thetext>Created attachment 99254
Logging initialization for WebProcess</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>430245</commentid>
    <comment_count>7</comment_count>
    <who name="Lukasz Slachciak">l.slachciak</who>
    <bug_when>2011-06-30 01:25:25 -0700</bug_when>
    <thetext>As for 80c limit looks like there was discussion about it and it was considered as no more needed requirement.
https://lists.webkit.org/pipermail/webkit-dev/2010-April/012528.html

Anyway, for me my new patch with comments in two lines looks more clear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>433668</commentid>
    <comment_count>8</comment_count>
    <who name="Lukasz Slachciak">l.slachciak</who>
    <bug_when>2011-07-07 13:17:40 -0700</bug_when>
    <thetext>Eric, Leonardo is this patch ok for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465883</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-09-12 15:51:13 -0700</bug_when>
    <thetext>Sam wenig would know if this is needed for WebKit2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>555158</commentid>
    <comment_count>10</comment_count>
    <who name="Chang Shu">cshu</who>
    <bug_when>2012-02-13 03:45:08 -0800</bug_when>
    <thetext>It looks to me the LOG_DISABLED flag is forced to be 1 by default when not defined. So the patch should be pretty safe and cause no regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>558006</commentid>
    <comment_count>11</comment_count>
      <attachid>99254</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-16 02:23:53 -0800</bug_when>
    <thetext>Comment on attachment 99254
Logging initialization for WebProcess

Rejecting attachment 99254 from commit-queue.

Failed to run &quot;[&apos;/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=queues.webkit.org&apos;, &apos;-...&quot; exit_code: 2

Last 500 characters of output:
rsed 2 diffs from patch file(s).
patching file Source/WebKit2/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit2/WebProcess/WebProcess.cpp
Hunk #1 FAILED at 31.
Hunk #2 succeeded at 153 with fuzz 2 (offset 14 lines).
1 out of 2 hunks FAILED -- saving rejects to file Source/WebKit2/WebProcess/WebProcess.cpp.rej

Failed to run &quot;[u&apos;/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply&apos;, u&apos;--force&apos;, u&apos;--reviewer&apos;, u&apos;Chang Shu&apos;]&quot; exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/11535132</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>856677</commentid>
    <comment_count>12</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-03-16 22:52:03 -0700</bug_when>
    <thetext>Unsure if this specific patch ever got landed, but we do initialize logging now.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>98619</attachid>
            <date>2011-06-26 02:08:23 -0700</date>
            <delta_ts>2011-06-30 01:11:57 -0700</delta_ts>
            <desc>Patch for logging initialization for WebProcess</desc>
            <filename>loginit.patch</filename>
            <type>text/plain</type>
            <size>1480</size>
            <attacher name="Lukasz Slachciak">l.slachciak</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCBmMTNmNGEyLi5lYTg5YzY0IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTUg
QEAKKzIwMTEtMDYtMjYgIEx1a2FzeiBTbGFjaGNpYWsgIDxsLnNsYWNoY2lha0BzYW1zdW5nLmNv
bT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBbV2Vi
S2l0Ml0gQWRkIGxvZ2dpbmcgaW5pdGlhbGl6YXRpb24gZm9yIFdlYlByb2Nlc3MuCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD02MzM5NQorCisgICAgICAg
IExvZ2dpbmcgaW5pdGlhbGl6YXRpb24gd2FzIGFkZGVkIGZvciBXZWJQcm9jZXNzLiBTaW1pbGFy
IGluaXRpYWxpemF0aW9uIGlzIGFscmVhZHkgZG9uZSBmb3IgVUlQcm9jZXNzLgorCisgICAgICAg
ICogV2ViUHJvY2Vzcy9XZWJQcm9jZXNzLmNwcDoKKyAgICAgICAgKFdlYktpdDo6V2ViUHJvY2Vz
czo6V2ViUHJvY2Vzc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ICAg
IFdlYktpdDo6aW5pdGlhbGl6ZUxvZ0NoYW5uZWxzSWZOZWNlc3NhcnkoKTsKKyNlbmRpZgogCiAg
ICAgV2ViQ29yZTo6SW5pdGlhbGl6ZUxvZ2dpbmdDaGFubmVsc0lmTmVjZXNzYXJ5KCk7CiB9Cg==
</data>
<flag name="review"
          id="92878"
          type_id="1"
          status="-"
          setter="leandro"
    />
    <flag name="commit-queue"
          id="92879"
          type_id="3"
          status="-"
          setter="leandro"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>99254</attachid>
            <date>2011-06-30 01:11:57 -0700</date>
            <delta_ts>2012-02-16 02:23:53 -0800</delta_ts>
            <desc>Logging initialization for WebProcess</desc>
            <filename>loginit2.patch</filename>
            <type>text/plain</type>
            <size>1478</size>
            <attacher name="Lukasz Slachciak">l.slachciak</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCBlMWIxNzdkLi4zMDRlYjgwIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMTEtMDYtMzAgIEx1a2FzeiBTbGFjaGNpYWsgIDxsLnNsYWNoY2lha0BzYW1zdW5nLmNv
bT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBbV2Vi
S2l0Ml0gQWRkIGxvZ2dpbmcgaW5pdGlhbGl6YXRpb24gZm9yIFdlYlByb2Nlc3MuCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD02MzM5NQorCisgICAgICAg
IExvZ2dpbmcgaW5pdGlhbGl6YXRpb24gYWRkZWQgZm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zOjpXZWJQcm9jZXNzKCkKICAgICAvLyBJbml0aWFsaXplIG91ciBwbGF0Zm9ybSBz
dHJhdGVnaWVzLgogICAgIFdlYlBsYXRmb3JtU3RyYXRlZ2llczo6aW5pdGlhbGl6ZSgpOwogI2Vu
ZGlmIC8vIFVTRShQTEFURk9STV9TVFJBVEVHSUVTKQorI2lmICFMT0dfRElTQUJMRUQKKyAgICBX
ZWJLaXQ6OmluaXRpYWxpemVMb2dDaGFubmVsc0lmTmVjZXNzYXJ5KCk7CisjZW5kaWYKIAogICAg
IFdlYkNvcmU6OkluaXRpYWxpemVMb2dnaW5nQ2hhbm5lbHNJZk5lY2Vzc2FyeSgpOwogfQo=
</data>
<flag name="review"
          id="93692"
          type_id="1"
          status="+"
          setter="cshu"
    />
    <flag name="commit-queue"
          id="93693"
          type_id="3"
          status="-"
          setter="webkit.review.bot"
    />
          </attachment>
      

    </bug>

</bugzilla>