RESOLVED FIXED 74322
WebAudio: Use Logging instead of printf.
https://bugs.webkit.org/show_bug.cgi?id=74322
Summary WebAudio: Use Logging instead of printf.
Jer Noble
Reported 2011-12-12 12:59:12 PST
WebAudio should use Logging instead of printf.
Attachments
Patch (8.92 KB, patch)
2011-12-12 13:03 PST, Jer Noble
no flags
Patch (8.91 KB, patch)
2011-12-12 15:57 PST, Jer Noble
no flags
Patch (5.21 KB, patch)
2011-12-12 17:20 PST, Jer Noble
darin: review+
Jer Noble
Comment 1 2011-12-12 13:03:03 PST
Jer Noble
Comment 2 2011-12-12 15:57:47 PST
Created attachment 118897 [details] Patch Rebased patch against ToT.
Sam Weinig
Comment 3 2011-12-12 16:45:56 PST
Comment on attachment 118897 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=118897&action=review > Source/WebCore/webaudio/AudioContext.cpp:184 > #if DEBUG_AUDIONODE_REFERENCES > - printf("%p: AudioContext::~AudioContext()\n", this); > + LOG(WebAudio, "%p: AudioContext::~AudioContext()\n", this); > #endif If this is only for debugging, I don't think you should use printf. > Source/WebCore/webaudio/AudioNode.cpp:314 > void AudioNode::printNodeCounts() Who calls this? If it is only for debugging (from a debugger) I think printf is probably more idiomatic. > Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp:54 > #ifndef NDEBUG > - fprintf(stderr, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > + LOG(WebAudio, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > #endif This #ifndef is no longer needed.
Jer Noble
Comment 4 2011-12-12 17:01:00 PST
(In reply to comment #3) > (From update of attachment 118897 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=118897&action=review > > > Source/WebCore/webaudio/AudioContext.cpp:184 > > #if DEBUG_AUDIONODE_REFERENCES > > - printf("%p: AudioContext::~AudioContext()\n", this); > > + LOG(WebAudio, "%p: AudioContext::~AudioContext()\n", this); > > #endif > > If this is only for debugging, I don't think you should use printf. Do you mean, "I don't think you should use LOG", or "I [do] think you should use printf"? > > Source/WebCore/webaudio/AudioNode.cpp:314 > > void AudioNode::printNodeCounts() > > Who calls this? If it is only for debugging (from a debugger) I think printf is probably more idiomatic. This is called by the AudioNode constructor, provided DEBUG_AUDIONODE_REFERENCES is enabled. > > Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp:54 > > #ifndef NDEBUG > > - fprintf(stderr, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > > + LOG(WebAudio, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); > > #endif > > This #ifndef is no longer needed. I'll delete it.
Jer Noble
Comment 5 2011-12-12 17:20:12 PST
Jer Noble
Comment 6 2012-01-12 14:12:06 PST
Note You need to log in before you can comment on or make changes to this bug.