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

Side by Side Diff: base/logging.h

Issue 115773: Prototype implementation of zygotes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « base/file_util_posix.cc ('k') | base/logging.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 8 #include <string>
9 #include <cstring> 9 #include <cstring>
10 #include <sstream> 10 #include <sstream>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Sets the log level. Anything at or above this level will be written to the 135 // Sets the log level. Anything at or above this level will be written to the
136 // log file/displayed to the user (if applicable). Anything below this level 136 // log file/displayed to the user (if applicable). Anything below this level
137 // will be silently ignored. The log level defaults to 0 (everything is logged) 137 // will be silently ignored. The log level defaults to 0 (everything is logged)
138 // if this function is not called. 138 // if this function is not called.
139 void SetMinLogLevel(int level); 139 void SetMinLogLevel(int level);
140 140
141 // Gets the current log level. 141 // Gets the current log level.
142 int GetMinLogLevel(); 142 int GetMinLogLevel();
143 143
144 #if defined(OS_LINUX)
145 // Get the file descriptor used for logging.
146 // Returns -1 if none open.
147 // Needed by ZygoteManager.
148 int GetLoggingFileDescriptor();
149 #endif
150
144 // Sets the log filter prefix. Any log message below LOG_ERROR severity that 151 // Sets the log filter prefix. Any log message below LOG_ERROR severity that
145 // doesn't start with this prefix with be silently ignored. The filter defaults 152 // doesn't start with this prefix with be silently ignored. The filter defaults
146 // to NULL (everything is logged) if this function is not called. Messages 153 // to NULL (everything is logged) if this function is not called. Messages
147 // with severity of LOG_ERROR or higher will not be filtered. 154 // with severity of LOG_ERROR or higher will not be filtered.
148 void SetLogFilterPrefix(const char* filter); 155 void SetLogFilterPrefix(const char* filter);
149 156
150 // Sets the common items you want to be prepended to each log message. 157 // Sets the common items you want to be prepended to each log message.
151 // process and thread IDs default to off, the timestamp defaults to on. 158 // process and thread IDs default to off, the timestamp defaults to on.
152 // If this function is not called, logging defaults to writing the timestamp 159 // If this function is not called, logging defaults to writing the timestamp
153 // only. 160 // only.
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 #elif NOTIMPLEMENTED_POLICY == 4 642 #elif NOTIMPLEMENTED_POLICY == 4
636 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG 643 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG
637 #elif NOTIMPLEMENTED_POLICY == 5 644 #elif NOTIMPLEMENTED_POLICY == 5
638 #define NOTIMPLEMENTED() do {\ 645 #define NOTIMPLEMENTED() do {\
639 static int count = 0;\ 646 static int count = 0;\
640 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ 647 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\
641 } while(0) 648 } while(0)
642 #endif 649 #endif
643 650
644 #endif // BASE_LOGGING_H_ 651 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « base/file_util_posix.cc ('k') | base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698