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

Side by Side Diff: base/logging.h

Issue 8757002: Don't delete g_vlog_info (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Limit g_vlog_info to two instances and track both. Created 9 years 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 | « no previous file | base/logging.cc » ('j') | base/logging.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <cassert> 9 #include <cassert>
10 #include <string> 10 #include <string>
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // Sets the log file name and other global logging state. Calling this function 202 // Sets the log file name and other global logging state. Calling this function
203 // is recommended, and is normally done at the beginning of application init. 203 // is recommended, and is normally done at the beginning of application init.
204 // If you don't call it, all the flags will be initialized to their default 204 // If you don't call it, all the flags will be initialized to their default
205 // values, and there is a race condition that may leak a critical section 205 // values, and there is a race condition that may leak a critical section
206 // object if two threads try to do the first log at the same time. 206 // object if two threads try to do the first log at the same time.
207 // See the definition of the enums above for descriptions and default values. 207 // See the definition of the enums above for descriptions and default values.
208 // 208 //
209 // The default log file is initialized to "debug.log" in the application 209 // The default log file is initialized to "debug.log" in the application
210 // directory. You probably don't want this, especially since the program 210 // directory. You probably don't want this, especially since the program
211 // directory may not be writable on an enduser's system. 211 // directory may not be writable on an enduser's system.
212 //
213 // This function may be called a second time to re-direct logging (e.g after
214 // loging in to a user partition), however it should never be called more than
215 // twice.
212 inline bool InitLogging(const PathChar* log_file, 216 inline bool InitLogging(const PathChar* log_file,
213 LoggingDestination logging_dest, 217 LoggingDestination logging_dest,
214 LogLockingState lock_log, 218 LogLockingState lock_log,
215 OldFileDeletionState delete_old, 219 OldFileDeletionState delete_old,
216 DcheckState dcheck_state) { 220 DcheckState dcheck_state) {
217 return BaseInitLoggingImpl(log_file, logging_dest, lock_log, 221 return BaseInitLoggingImpl(log_file, logging_dest, lock_log,
218 delete_old, dcheck_state); 222 delete_old, dcheck_state);
219 } 223 }
220 224
221 // Sets the log level. Anything at or above this level will be written to the 225 // Sets the log level. Anything at or above this level will be written to the
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 namespace base { 959 namespace base {
956 960
957 class StringPiece; 961 class StringPiece;
958 962
959 // Allows StringPiece to be logged. 963 // Allows StringPiece to be logged.
960 BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece); 964 BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
961 965
962 } // namespace base 966 } // namespace base
963 967
964 #endif // BASE_LOGGING_H_ 968 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « no previous file | base/logging.cc » ('j') | base/logging.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698