Bug 103544 - Make DataLog work on Windows
Summary: Make DataLog work on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-28 11:53 PST by Roger Fong
Modified: 2012-11-28 17:09 PST (History)
5 users (show)

See Also:


Attachments
patch (1.65 KB, patch)
2012-11-28 12:46 PST, Roger Fong
no flags Details | Formatted Diff | Diff
patch (1.57 KB, patch)
2012-11-28 12:53 PST, Roger Fong
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Fong 2012-11-28 11:53:16 PST
Datalog doesn't work on Windows (also doesn't compile).
Comment 1 Roger Fong 2012-11-28 12:46:05 PST
Created attachment 176552 [details]
patch
Comment 2 Roger Fong 2012-11-28 12:51:03 PST
Comment on attachment 176552 [details]
patch

Should be currentCurrentProcessId not ThreadId
Comment 3 Roger Fong 2012-11-28 12:53:55 PST
Created attachment 176557 [details]
patch
Comment 4 Roger Fong 2012-11-28 15:41:07 PST
http://trac.webkit.org/changeset/136070
Comment 5 Tim Horton 2012-11-28 16:33:47 PST
Comment on attachment 176557 [details]
patch

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

> Source/WTF/wtf/DataLog.cpp:49
> +// This path won't work on Windows, make sure to change to something like C:\\Users\\<more path>\\log.txt.
>  #define DATA_LOG_FILENAME "/tmp/WTFLog"

Why is this not #if PLATFORM(WIN)'d so it works out of the box?
Comment 6 Roger Fong 2012-11-28 17:06:52 PST
My impression of the DATA_LOG_FILE is that whoever wants to use the logging will probably change the path anyways to somewhere a little more easier to access than say /tmp/log.

If they're going to be changing it anyways then I think it makes sense to only have one place where the file name is specified.
Comment 7 Filip Pizlo 2012-11-28 17:09:58 PST
(In reply to comment #6)
> My impression of the DATA_LOG_FILE is that whoever wants to use the logging will probably change the path anyways to somewhere a little more easier to access than say /tmp/log.

That's my thinking as well.

> 
> If they're going to be changing it anyways then I think it makes sense to only have one place where the file name is specified.