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

Side by Side Diff: base/logging.h

Issue 2900763002: logging.h: Comment fix (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_LOGGING_H_ 5 #ifndef BASE_LOGGING_H_
6 #define BASE_LOGGING_H_ 6 #define BASE_LOGGING_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <cassert> 10 #include <cassert>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 // Gets the current log level. 246 // Gets the current log level.
247 BASE_EXPORT int GetMinLogLevel(); 247 BASE_EXPORT int GetMinLogLevel();
248 248
249 // Used by LOG_IS_ON to lazy-evaluate stream arguments. 249 // Used by LOG_IS_ON to lazy-evaluate stream arguments.
250 BASE_EXPORT bool ShouldCreateLogMessage(int severity); 250 BASE_EXPORT bool ShouldCreateLogMessage(int severity);
251 251
252 // Gets the VLOG default verbosity level. 252 // Gets the VLOG default verbosity level.
253 BASE_EXPORT int GetVlogVerbosity(); 253 BASE_EXPORT int GetVlogVerbosity();
254 254
255 // Gets the current vlog level for the given file (usually taken from
256 // __FILE__).
257
258 // Note that |N| is the size *with* the null terminator. 255 // Note that |N| is the size *with* the null terminator.
259 BASE_EXPORT int GetVlogLevelHelper(const char* file_start, size_t N); 256 BASE_EXPORT int GetVlogLevelHelper(const char* file_start, size_t N);
260 257
258 // Gets the current vlog level for the given file (usually taken from __FILE__).
261 template <size_t N> 259 template <size_t N>
262 int GetVlogLevel(const char (&file)[N]) { 260 int GetVlogLevel(const char (&file)[N]) {
263 return GetVlogLevelHelper(file, N); 261 return GetVlogLevelHelper(file, N);
264 } 262 }
265 263
266 // Sets the common items you want to be prepended to each log message. 264 // Sets the common items you want to be prepended to each log message.
267 // process and thread IDs default to off, the timestamp defaults to on. 265 // process and thread IDs default to off, the timestamp defaults to on.
268 // If this function is not called, logging defaults to writing the timestamp 266 // If this function is not called, logging defaults to writing the timestamp
269 // only. 267 // only.
270 BASE_EXPORT void SetLogItems(bool enable_process_id, bool enable_thread_id, 268 BASE_EXPORT void SetLogItems(bool enable_process_id, bool enable_thread_id,
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 #elif NOTIMPLEMENTED_POLICY == 5 1161 #elif NOTIMPLEMENTED_POLICY == 5
1164 #define NOTIMPLEMENTED() do {\ 1162 #define NOTIMPLEMENTED() do {\
1165 static bool logged_once = false;\ 1163 static bool logged_once = false;\
1166 LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\ 1164 LOG_IF(ERROR, !logged_once) << NOTIMPLEMENTED_MSG;\
1167 logged_once = true;\ 1165 logged_once = true;\
1168 } while(0);\ 1166 } while(0);\
1169 EAT_STREAM_PARAMETERS 1167 EAT_STREAM_PARAMETERS
1170 #endif 1168 #endif
1171 1169
1172 #endif // BASE_LOGGING_H_ 1170 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698