mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Format include/base comments for Doxygen (see issue #3384)
This commit is contained in:
@ -27,110 +27,130 @@
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file are only available to applications that link
|
||||
// against the libcef_dll_wrapper target.
|
||||
//
|
||||
// WARNING: Logging macros should not be used in the main/browser process before
|
||||
// calling CefInitialize or in sub-processes before calling CefExecuteProcess.
|
||||
//
|
||||
// Instructions
|
||||
// ------------
|
||||
//
|
||||
// Make a bunch of macros for logging. The way to log things is to stream
|
||||
// things to LOG(<a particular severity level>). E.g.,
|
||||
//
|
||||
// LOG(INFO) << "Found " << num_cookies << " cookies";
|
||||
//
|
||||
// You can also do conditional logging:
|
||||
//
|
||||
// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
|
||||
//
|
||||
// The CHECK(condition) macro is active in both debug and release builds and
|
||||
// effectively performs a LOG(FATAL) which terminates the process and
|
||||
// generates a crashdump unless a debugger is attached.
|
||||
//
|
||||
// There are also "debug mode" logging macros like the ones above:
|
||||
//
|
||||
// DLOG(INFO) << "Found cookies";
|
||||
//
|
||||
// DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
|
||||
//
|
||||
// All "debug mode" logging is compiled away to nothing for non-debug mode
|
||||
// compiles. LOG_IF and development flags also work well together
|
||||
// because the code can be compiled away sometimes.
|
||||
//
|
||||
// We also have
|
||||
//
|
||||
// LOG_ASSERT(assertion);
|
||||
// DLOG_ASSERT(assertion);
|
||||
//
|
||||
// which is syntactic sugar for {,D}LOG_IF(FATAL, assert fails) << assertion;
|
||||
//
|
||||
// There are "verbose level" logging macros. They look like
|
||||
//
|
||||
// VLOG(1) << "I'm printed when you run the program with --v=1 or more";
|
||||
// VLOG(2) << "I'm printed when you run the program with --v=2 or more";
|
||||
//
|
||||
// These always log at the INFO log level (when they log at all).
|
||||
// The verbose logging can also be turned on module-by-module. For instance,
|
||||
// --vmodule=profile=2,icon_loader=1,browser_*=3,*/chromeos/*=4 --v=0
|
||||
// will cause:
|
||||
// a. VLOG(2) and lower messages to be printed from profile.{h,cc}
|
||||
// b. VLOG(1) and lower messages to be printed from icon_loader.{h,cc}
|
||||
// c. VLOG(3) and lower messages to be printed from files prefixed with
|
||||
// "browser"
|
||||
// d. VLOG(4) and lower messages to be printed from files under a
|
||||
// "chromeos" directory.
|
||||
// e. VLOG(0) and lower messages to be printed from elsewhere
|
||||
//
|
||||
// The wildcarding functionality shown by (c) supports both '*' (match
|
||||
// 0 or more characters) and '?' (match any single character)
|
||||
// wildcards. Any pattern containing a forward or backward slash will
|
||||
// be tested against the whole pathname and not just the module.
|
||||
// E.g., "*/foo/bar/*=2" would change the logging level for all code
|
||||
// in source files under a "foo/bar" directory.
|
||||
//
|
||||
// There's also VLOG_IS_ON(n) "verbose level" condition macro. To be used as
|
||||
//
|
||||
// if (VLOG_IS_ON(2)) {
|
||||
// // do some logging preparation and logging
|
||||
// // that can't be accomplished with just VLOG(2) << ...;
|
||||
// }
|
||||
//
|
||||
// There is also a VLOG_IF "verbose level" condition macro for sample
|
||||
// cases, when some extra computation and preparation for logs is not
|
||||
// needed.
|
||||
//
|
||||
// VLOG_IF(1, (size > 1024))
|
||||
// << "I'm printed when size is more than 1024 and when you run the "
|
||||
// "program with --v=1 or more";
|
||||
//
|
||||
// We also override the standard 'assert' to use 'DLOG_ASSERT'.
|
||||
//
|
||||
// Lastly, there is:
|
||||
//
|
||||
// PLOG(ERROR) << "Couldn't do foo";
|
||||
// DPLOG(ERROR) << "Couldn't do foo";
|
||||
// PLOG_IF(ERROR, cond) << "Couldn't do foo";
|
||||
// DPLOG_IF(ERROR, cond) << "Couldn't do foo";
|
||||
// PCHECK(condition) << "Couldn't do foo";
|
||||
// DPCHECK(condition) << "Couldn't do foo";
|
||||
//
|
||||
// which append the last system error to the message in string form (taken from
|
||||
// GetLastError() on Windows and errno on POSIX).
|
||||
//
|
||||
// The supported severity levels for macros that allow you to specify one
|
||||
// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL.
|
||||
//
|
||||
// Very important: logging a message at the FATAL severity level causes
|
||||
// the program to terminate (after the message is logged).
|
||||
//
|
||||
// There is the special severity of DFATAL, which logs FATAL in debug mode,
|
||||
// ERROR in normal mode.
|
||||
//
|
||||
|
||||
///
|
||||
/// \file
|
||||
/// A bunch of macros for logging.
|
||||
///
|
||||
/// NOTE: The contents of this file are only available to applications that link
|
||||
/// against the libcef_dll_wrapper target.
|
||||
///
|
||||
/// WARNING: Logging macros should not be used in the main/browser process
|
||||
/// before calling CefInitialize or in sub-processes before calling
|
||||
/// CefExecuteProcess.
|
||||
///
|
||||
/// INSTRUCTIONS:
|
||||
///
|
||||
/// The way to log things is to stream things to LOG(<a particular severity
|
||||
/// level>). E.g.,
|
||||
///
|
||||
/// <pre>
|
||||
/// LOG(INFO) << "Found " << num_cookies << " cookies";
|
||||
/// </pre>
|
||||
///
|
||||
/// You can also do conditional logging:
|
||||
///
|
||||
/// <pre>
|
||||
/// LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
|
||||
/// </pre>
|
||||
///
|
||||
/// The CHECK(condition) macro is active in both debug and release builds and
|
||||
/// effectively performs a LOG(FATAL) which terminates the process and
|
||||
/// generates a crashdump unless a debugger is attached.
|
||||
///
|
||||
/// There are also "debug mode" logging macros like the ones above:
|
||||
///
|
||||
/// <pre>
|
||||
/// DLOG(INFO) << "Found cookies";
|
||||
///
|
||||
/// DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
|
||||
/// </pre>
|
||||
///
|
||||
/// All "debug mode" logging is compiled away to nothing for non-debug mode
|
||||
/// compiles. LOG_IF and development flags also work well together
|
||||
/// because the code can be compiled away sometimes.
|
||||
///
|
||||
/// We also have
|
||||
///
|
||||
/// <pre>
|
||||
/// LOG_ASSERT(assertion);
|
||||
/// DLOG_ASSERT(assertion);
|
||||
/// </pre>
|
||||
///
|
||||
/// which is syntactic sugar for "{,D}LOG_IF(FATAL, assert fails) << assertion;"
|
||||
///
|
||||
/// There are "verbose level" logging macros. They look like
|
||||
///
|
||||
/// <pre>
|
||||
/// VLOG(1) << "I'm printed when you run the program with --v=1 or more";
|
||||
/// VLOG(2) << "I'm printed when you run the program with --v=2 or more";
|
||||
/// </pre>
|
||||
///
|
||||
/// These always log at the INFO log level (when they log at all).
|
||||
/// The verbose logging can also be turned on module-by-module. For instance,
|
||||
/// <pre>
|
||||
/// --vmodule=profile=2,icon_loader=1,browser_*=3,*/chromeos/*=4 --v=0
|
||||
/// </pre>
|
||||
/// will cause:
|
||||
/// 1. VLOG(2) and lower messages to be printed from profile.{h,cc}
|
||||
/// 2. VLOG(1) and lower messages to be printed from icon_loader.{h,cc}
|
||||
/// 3. VLOG(3) and lower messages to be printed from files prefixed with
|
||||
/// "browser"
|
||||
/// 4. VLOG(4) and lower messages to be printed from files under a
|
||||
/// "chromeos" directory.
|
||||
/// 5. VLOG(0) and lower messages to be printed from elsewhere
|
||||
///
|
||||
/// The wildcarding functionality shown by (c) supports both '*' (match
|
||||
/// 0 or more characters) and '?' (match any single character)
|
||||
/// wildcards. Any pattern containing a forward or backward slash will
|
||||
/// be tested against the whole pathname and not just the module.
|
||||
/// E.g., "*/foo/bar/*=2" would change the logging level for all code
|
||||
/// in source files under a "foo/bar" directory.
|
||||
///
|
||||
/// There's also VLOG_IS_ON(n) "verbose level" condition macro. To be used as
|
||||
///
|
||||
/// <pre>
|
||||
/// if (VLOG_IS_ON(2)) {
|
||||
/// // do some logging preparation and logging
|
||||
/// // that can't be accomplished with just VLOG(2) << ...;
|
||||
/// }
|
||||
/// </pre>
|
||||
///
|
||||
/// There is also a VLOG_IF "verbose level" condition macro for sample
|
||||
/// cases, when some extra computation and preparation for logs is not
|
||||
/// needed.
|
||||
///
|
||||
/// <pre>
|
||||
/// VLOG_IF(1, (size > 1024))
|
||||
/// << "I'm printed when size is more than 1024 and when you run the "
|
||||
/// "program with --v=1 or more";
|
||||
/// </pre>
|
||||
///
|
||||
/// We also override the standard 'assert' to use 'DLOG_ASSERT'.
|
||||
///
|
||||
/// Lastly, there is:
|
||||
///
|
||||
/// <pre>
|
||||
/// PLOG(ERROR) << "Couldn't do foo";
|
||||
/// DPLOG(ERROR) << "Couldn't do foo";
|
||||
/// PLOG_IF(ERROR, cond) << "Couldn't do foo";
|
||||
/// DPLOG_IF(ERROR, cond) << "Couldn't do foo";
|
||||
/// PCHECK(condition) << "Couldn't do foo";
|
||||
/// DPCHECK(condition) << "Couldn't do foo";
|
||||
/// </pre>
|
||||
///
|
||||
/// which append the last system error to the message in string form (taken from
|
||||
/// GetLastError() on Windows and errno on POSIX).
|
||||
///
|
||||
/// The supported severity levels for macros that allow you to specify one
|
||||
/// are (in increasing order of severity) INFO, WARNING, ERROR, and FATAL.
|
||||
///
|
||||
/// Very important: logging a message at the FATAL severity level causes
|
||||
/// the program to terminate (after the message is logged).
|
||||
///
|
||||
/// There is the special severity of DFATAL, which logs FATAL in debug mode,
|
||||
/// ERROR in normal mode.
|
||||
///
|
||||
|
||||
#ifndef CEF_INCLUDE_BASE_CEF_LOGGING_H_
|
||||
#define CEF_INCLUDE_BASE_CEF_LOGGING_H_
|
||||
|
Reference in New Issue
Block a user