Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: third_party/WebKit/Source/wtf/ScopedLogger.md

Issue 2240043002: Remove WTF_LOG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foo Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.cpp ('k') | third_party/WebKit/public/web/WebKit.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Debugging with ScopedLogger 1 # Debugging with ScopedLogger
2 2
3 ## Overview 3 ## Overview
4 4
5 ScopedLogger is a logger that shows nested calls by indenting. 5 ScopedLogger is a logger that shows nested calls by indenting.
6 6
7 For example, if you were debugging a layout issue you could add a ScopedLogger 7 For example, if you were debugging a layout issue you could add a ScopedLogger
8 to the top of the `LayoutBlock::layout` function: 8 to the top of the `LayoutBlock::layout` function:
9 9
10 ```c++ 10 ```c++
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ## Requirements 82 ## Requirements
83 83
84 The ScopedLogger class and associated macros are defined in 84 The ScopedLogger class and associated macros are defined in
85 [Assertions.h](Assertions.h), which most Blink source files already include 85 [Assertions.h](Assertions.h), which most Blink source files already include
86 indirectly. ScopedLogger can't be used outside of Blink code yet. 86 indirectly. ScopedLogger can't be used outside of Blink code yet.
87 87
88 The ScopedLogger macros work in debug builds by default. They are compiled out 88 The ScopedLogger macros work in debug builds by default. They are compiled out
89 of release builds, unless your `GYP_DEFINES` or GN args file includes one of the 89 of release builds, unless your `GYP_DEFINES` or GN args file includes one of the
90 following: 90 following:
91 91
92 * `dcheck_always_on`: enables assertions and logging 92 * `dcheck_always_on`: enables assertions and ScopedLogger
93 * `blink_logging_always_on`: enables logging, but not assertions 93 * `blink_logging_always_on`: enables ScopedLogger, but not assertions
94
95 (These are the same rules that govern `WTF_LOG` and other WTF logging macros.)
96 94
97 The macro names are cumbersome to type, but most editors can be configured to 95 The macro names are cumbersome to type, but most editors can be configured to
98 make this easier. For example, you can add the following to a Sublime Text key 96 make this easier. For example, you can add the following to a Sublime Text key
99 binding file to make Ctrl+Alt+L insert a ScopedLogger: 97 binding file to make Ctrl+Alt+L insert a ScopedLogger:
100 98
101 ``` 99 ```
102 { "keys": ["ctrl+alt+l"], "command": "insert", 100 { "keys": ["ctrl+alt+l"], "command": "insert",
103 "args": {"characters": "WTF_CREATE_SCOPED_LOGGER(logger, \"msg\");"} 101 "args": {"characters": "WTF_CREATE_SCOPED_LOGGER(logger, \"msg\");"}
104 } 102 }
105 ``` 103 ```
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.cpp ('k') | third_party/WebKit/public/web/WebKit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698