Closed
Bug 795126
Opened 13 years ago
Closed 13 years ago
Make iostream-based debugging DEBUG-only (signaling, mtransport)
Categories
(Core :: WebRTC, defect)
Core
WebRTC
Tracking
()
RESOLVED
FIXED
People
(Reporter: jesup, Assigned: ehugg)
Details
(Whiteboard: [WebRTC], [blocking-webrtc+] [qa-])
Attachments
(1 file, 1 obsolete file)
|
11.66 KB,
patch
|
ekr
:
feedback+
|
Details | Diff | Splinter Review |
[17:25] bsmedberg jesup: iostream has caused linkage issues in the past, but I forget why. I don't think we should be using it in production environments without more thought, but for logging-debugging code I think the rule can be "if it works on try it's ok"
[17:25] bsmedberg jesup: the problems would be dealing with code that threw exceptions on IO failure, mainly
We should look to make them disappear on production, and debugs needed on production move to avoid iostreams.
This assumes they don't do that already for all the cases.
Updated•13 years ago
|
Whiteboard: [WebRTC], [blocking-webrtc+]
| Assignee | ||
Comment 1•13 years ago
|
||
In the signaling code CSFLogDebugS and CSFLogErrorS are the main things that use streams. They could be replaced by their printf-style equivalents without the trailing S. The stream versions were created because they were considered safer than the printf-style ones.
| Assignee | ||
Comment 2•13 years ago
|
||
| Assignee | ||
Comment 3•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Attachment #668537 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•13 years ago
|
||
Comment on attachment 668542 [details] [diff] [review]
Remove io streams in Signaling code for non-debug builds
All usages of stream should be removed now from signaling unless DEBUG is defined.
Attachment #668542 -
Flags: feedback?(ekr)
Comment 5•13 years ago
|
||
Comment on attachment 668542 [details] [diff] [review]
Remove io streams in Signaling code for non-debug builds
Review of attachment 668542 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
::: media/webrtc/signaling/src/common/browser_logging/CSFLogStream.h
@@ +55,5 @@
> #define CSFLogDebugS(tag, message) { std::ostringstream _oss; _oss << message << std::endl; CSFLog( CSF_LOG_DEBUG, __FILE__ , __LINE__ , tag, _oss.str().c_str()); }
>
> +#else // DEBUG
> +
> +#define CSFLogCriticalS(tag, message)
I would do {} to keep the syntax the same.
Attachment #668542 -
Flags: feedback?(ekr) → feedback+
| Assignee | ||
Comment 6•13 years ago
|
||
Comment on attachment 668542 [details] [diff] [review]
Remove io streams in Signaling code for non-debug builds
Signaling code patch pushed to Alder - https://hg.mozilla.org/projects/alder/rev/b73eec736a65
| Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ethanhugg
Updated•13 years ago
|
Whiteboard: [WebRTC], [blocking-webrtc+] → [WebRTC], [blocking-webrtc+] [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•