summaryrefslogtreecommitdiffstats
path: root/base/logging.h
Commit message (Collapse)AuthorAgeFilesLines
* Make NOTIMPLEMENTED_POLICY=0 actually work.torne@chromium.org2012-01-301-1/+1
| | | | | | | | | | | | Various places in the code use NOTIMPLEMENTED() with << "message" like the other logging macros; this doesn't work when NOTIMPLEMENTED expands to a semicolon. Expand it to EAT_STREAM_PARAMETERS instead so any parameters are simply compiled away in this case. Review URL: http://codereview.chromium.org/9244006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119711 0039d316-1c4b-4281-b951-d872f2087c98
* Add OSSTATUS_LOG API.mark@chromium.org2012-01-271-1/+0
| | | | | | Review URL: https://chromiumcodereview.appspot.com/9235084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119511 0039d316-1c4b-4281-b951-d872f2087c98
* Move operator<< for StringPiece into string_piece.{h,cc}akalin@chromium.org2012-01-201-11/+1
| | | | | | | | | BUG=110651 TEST= Review URL: https://chromiumcodereview.appspot.com/9159005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118416 0039d316-1c4b-4281-b951-d872f2087c98
* Extract common code from StringPiece and StringPiece16 into a templated base ↵erikwright@chromium.org2011-12-221-1/+2
| | | | | | | | | | | | | | | | | class. Convert copy-and-pasted unit tests into TYPED_TESTs. The motivation is that I wish to add constructors for string::iterator ranges and I don't want to do it twice. The motivation for adding the string::iterator range constructors is to reduce the number of overloads in string_number_conversions.h . BUG=87634 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114242 Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115616 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Extract common code from StringPiece and StringPiece16 into a ↵erikwright@chromium.org2011-12-131-2/+1
| | | | | | | | | | | | | | | templated base class.... ... Convert copy-and-pasted unit tests into TYPED_TESTs." This reverts commit 20543ba53ab8737affb06a21149c15f772246aed. BUG= TEST= Review URL: http://codereview.chromium.org/8933012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114255 0039d316-1c4b-4281-b951-d872f2087c98
* Extract common code from StringPiece and StringPiece16 into a templated base ↵erikwright@chromium.org2011-12-131-1/+2
| | | | | | | | | | | | | | | class. Convert copy-and-pasted unit tests into TYPED_TESTs. The motivation is that I wish to add constructors for string::iterator ranges and I don't want to do it twice. The motivation for adding the string::iterator range constructors is to reduce the number of overloads in string_number_conversions.h . BUG=87634 TEST= Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114242 0039d316-1c4b-4281-b951-d872f2087c98
* Don't delete g_vlog_infostevenjb@chromium.org2011-12-031-0/+4
| | | | | | | | | | | | Fixes a race on startup. See issue for details. BUG=chromium-os:20865 TEST=Ensure logging, including VLOG, works. TBR=willchen@chromium.org Review URL: http://codereview.chromium.org/8757002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112828 0039d316-1c4b-4281-b951-d872f2087c98
* Make CHECK not print messages in official buildsakalin@chromium.org2011-12-021-27/+52
| | | | | | | | | | | | | | | | | | | | | | | | This cuts down on the number of strings in the executable, as well as executable code to print them. On Linux, this saves 208kb on a stripped official build (chrome executable file went from 64569072 bytes -> 64782064 bytes) On OS X, this saves 209kb on an official build (Google Chrome Framework went from 51483872 bytes -> 51274984 bytes) On Windows, this saves 139kb on an official build (chrome.dll went from 28619264 bytes -> 28477440 bytes) Fix test failure in logging_unittest.cc in official builds. Add new executable check_example for easy testing of changes to the CHECK macros. BUG=101561 TEST= Review URL: http://codereview.chromium.org/8734021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112649 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug where DVLOGs are treated as DLOG(INFO)sakalin@chromium.org2011-10-251-1/+1
| | | | | | | | | | BUG=101424 TEST= Review URL: http://codereview.chromium.org/8375036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107072 0039d316-1c4b-4281-b951-d872f2087c98
* base: Reenable external templates in logging.h when using component build.erg@chromium.org2011-10-241-6/+10
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8360023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106966 0039d316-1c4b-4281-b951-d872f2087c98
* Remove no longer needed android hack from logging.torne@chromium.org2011-10-111-5/+0
| | | | | | | | | | This hack is not needed any more; NOTREACHEDs should be handled the same as explicit DCHECKs. Review URL: http://codereview.chromium.org/8233006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104913 0039d316-1c4b-4281-b951-d872f2087c98
* Add a gyp flag to enable dcheck by default in release withoutnsylvain@chromium.org2011-09-201-1/+14
| | | | | | | | | having the pass a flag. This will be used on the try bots. BUG=96753 Review URL: http://codereview.chromium.org/7719007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102017 0039d316-1c4b-4281-b951-d872f2087c98
* Rename BASE_API to BASE_EXPORT.darin@chromium.org2011-08-051-26/+26
| | | | | | | R=rvargas Review URL: http://codereview.chromium.org/7461141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
* Add COMPONENT_BUILD global define. darin@chromium.org2011-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | This avoids the need to define FOO_DLL macros for each project that we wish to optionally build as a DLL (when component=="shared_library"). This in turn means that we do not need direct_dependent_settings to define FOO_DLL, and that means that we don't need to update projects to convert transitive dependencies into explicit dependencies. This makes the component build more consistent with the static build. An alternative would be to use all_dependent_settings, but I feel that the global approach is simpler as it creates less repetition in each target definition for components. A side-effect of this change is that I needed to make base_nacl_win64 be a shared_library in the component build. R=rvargas,bradnelson,evan Review URL: http://codereview.chromium.org/7344022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92409 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add COMPONENT_BUILD global define. "yurys@chromium.org2011-07-131-1/+1
| | | | | | | | | | | | | The change broke compilation on Linux Builder (dbg)(shared): http://build.chromium.org/p/chromium/builders/Linux%20Builder%20%28dbg%29%28shared%29/builds/3365/steps/compile/logs/stdio TBR=darin BUG=None TEST=None Review URL: http://codereview.chromium.org/7352014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92329 0039d316-1c4b-4281-b951-d872f2087c98
* Add COMPONENT_BUILD global define. darin@chromium.org2011-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | This avoids the need to define FOO_DLL macros for each project that we wish to optionally build as a DLL (when component=="shared_library"). This in turn means that we do not need direct_dependent_settings to define FOO_DLL, and that means that we don't need to update projects to convert transitive dependencies into explicit dependencies. This makes the component build more consistent with the static build. An alternative would be to use all_dependent_settings, but I feel that the global approach is simpler as it creates less repetition in each target definition for components. A side-effect of this change is that I needed to make base_nacl_win64 be a shared_library in the component build. R=rvargas,bradnelson Review URL: http://codereview.chromium.org/7344022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92325 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream android debug and log related filesmichaelbai@google.com2011-07-071-0/+5
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7238012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91748 0039d316-1c4b-4281-b951-d872f2087c98
* Adding missing inclusionstzik@chromium.org2011-06-181-0/+1
| | | | | | | | | | BUG=None TEST='LoggingTest.*,FileUtilTest.*,PlatformFile.*,StringNumberConversionsTest.*,Time,TimeTicks,TimeDelta' Review URL: http://codereview.chromium.org/7108033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89595 0039d316-1c4b-4281-b951-d872f2087c98
* linux: components support for base/evan@chromium.org2011-04-291-2/+2
| | | | | | | | This builds base_unittests using libbase as a component. Review URL: http://codereview.chromium.org/6904109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83583 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Fix the logging export api to fix release builds ofrvargas@google.com2011-04-261-1/+1
| | | | | | | | | | chrome using base.dll BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6904010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83073 0039d316-1c4b-4281-b951-d872f2087c98
* Base: More adjustments to BASE_API and project dependencies torvargas@google.com2011-04-211-1/+1
| | | | | | | | | | use base.dll from chrome. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6877053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82564 0039d316-1c4b-4281-b951-d872f2087c98
* Base: A few more changes to build base.dllrvargas@google.com2011-04-011-2/+2
| | | | | | | | BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6784002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80104 0039d316-1c4b-4281-b951-d872f2087c98
* Base: A few more files using BASE_API (for base.dll)rvargas@google.com2011-03-251-23/+25
| | | | | | | | BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6733031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79426 0039d316-1c4b-4281-b951-d872f2087c98
* Lower logging for expected errors in process_util_mac.mmsail@chromium.org2011-03-061-0/+21
| | | | | | | | BUG=None TEST=None git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77082 0039d316-1c4b-4281-b951-d872f2087c98
* [Logging] Remove unneeded CheckOpString struct for CHECKsakalin@chromium.org2011-02-081-17/+9
| | | | | | | | | | | | | | | Using string* directly works. Made LogMessage delete any passed in string* after it uses it. Removed suppressions for fixed memory leak. BUG=57683 TEST=Existing unit tests Review URL: http://codereview.chromium.org/6413032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74100 0039d316-1c4b-4281-b951-d872f2087c98
* Change UTF8ToUTF16 to accept const StringPiece&.suzhe@google.com2011-01-281-0/+9
| | | | | | | | | BUG=70936 TEST=All unit tests should pass. Review URL: http://codereview.chromium.org/6317016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72921 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging not look up --enable-dcheck from command lineakalin@chromium.org2011-01-111-7/+16
| | | | | | | | | | | | | | | | Made --enable-dcheck a parameter to InitLogging() and fixed up all callsites. BUG=62736 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70782 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70920 Review URL: http://codereview.chromium.org/6070006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70977 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70920 - Made logging not look up --enable-dcheck from command lineakalin@chromium.org2011-01-101-16/+7
| | | | | | | | | | | | | | | | | Made --enable-dcheck a parameter to InitLogging() and fixed up all callsites. BUG=62736 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70782 Review URL: http://codereview.chromium.org/6070006 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/6099012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70923 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging not look up --enable-dcheck from command lineakalin@chromium.org2011-01-101-7/+16
| | | | | | | | | | | | | | Made --enable-dcheck a parameter to InitLogging() and fixed up all callsites. BUG=62736 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70782 Review URL: http://codereview.chromium.org/6070006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70920 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70782 - Made logging not look up --enable-dcheck from command lineakalin@chromium.org2011-01-071-16/+7
| | | | | | | | | | | | | | | Made --enable-dcheck a parameter to InitLogging() and fixed up all callsites. BUG=62736 TEST=Manual Review URL: http://codereview.chromium.org/6070006 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/6100007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70783 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging not look up --enable-dcheck from command lineakalin@chromium.org2011-01-071-7/+16
| | | | | | | | | | | | Made --enable-dcheck a parameter to InitLogging() and fixed up all callsites. BUG=62736 TEST=Manual Review URL: http://codereview.chromium.org/6070006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70782 0039d316-1c4b-4281-b951-d872f2087c98
* Start sorting methods in class declarations.erg@google.com2011-01-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | A lot of our headers are a mess and aren't organized. Impose the following order on files in the base/ directory: class Blah { each public/protected/private section: typedefs; enums; static constants; ctors; dtors; methods; overridden virtual methods; data members; }; BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70749 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate ETW with VLOG logging.siggi@chromium.org2010-11-041-6/+26
| | | | | | | | | | | | | This change extends the log severities into the negative for VLOG verbosities. It also keeps track of file/line information and passes it to any registered log handler. The log level is naturally controlled by translating ETW log levels to the severities. BUG=none TEST=none Review URL: http://codereview.chromium.org/4164011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65062 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the testing::LogDisabler for the change r64883. See ↵hansl@google.com2010-11-031-0/+2
| | | | | | | | | | | | | http://codereview.chromium.org/4262001/show The r64883 broke most unit tests in CEEE that relied on disabling logs while testing error paths. BUG=None TEST=None Review URL: http://codereview.chromium.org/4390001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64948 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug where CHECKs don't fire if min_log_level > FATALakalin@chromium.org2010-11-031-25/+26
| | | | | | | | | BUG=61510 TEST=New unittests in base_unittests Review URL: http://codereview.chromium.org/4262001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64883 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unused (and broken) logging functions.akalin@chromium.org2010-11-011-80/+22
| | | | | | | | | | | Moved DEFINE_CHECK_OP_IMPL to be closer to the CHECK_EQ et al. macros. BUG=9913 TEST=Existing unit tests Review URL: http://codereview.chromium.org/4140012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64671 0039d316-1c4b-4281-b951-d872f2087c98
* Wrote a custom pattern matcher for vmodule.akalin@chromium.org2010-11-011-2/+2
| | | | | | | | | | | | | | The custom pattern matcher matches any slash (forward or backward) to any slash. It also does not do escaping like MatchPattern(). Finally, '?' matches exactly one character, which matches google-glog behavior (MatchPattern() matches '?' to 0 or 1 character). BUG=61123 TEST=New unittests Review URL: http://codereview.chromium.org/4205005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64661 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed subtle difference in behavior between DCHECK and DCHECK_EQ et al.akalin@chromium.org2010-11-011-9/+15
| | | | | | | | | BUG=58998 TEST=New unit tests Review URL: http://codereview.chromium.org/4199005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64650 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for filtering on the entire pathname to --vmodule.akalin@chromium.org2010-10-291-3/+9
| | | | | | | | | | | | | Also cleaned up spurious warning when --vmodule is used but --v is not. Removed slow perf unittest from vlog_unittest.cc. BUG=61123 TEST=New vlog unittests Review URL: http://codereview.chromium.org/4140007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64346 0039d316-1c4b-4281-b951-d872f2087c98
* This fixes the logging for ChromeOS so that it uses symlinksgspencer@chromium.org2010-10-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | to log to instead of going to the timestamped files directly, so that the browser process can more precisely control the output file being used. It still creates timestamped logs, and the regular chrome operations should be unchanged. Added a bool return value to InitLogging so we know when it fails, because failing needs to be handled properly in ChromeOS to remove hanging symbolic links. [This change has already been reviewed and approved here: http://codereview.chromium.org/3983004/show Somehow the dcommit failed without me noticing, so I'm trying again.] BUG=http://crosbug.com/6343 TEST=ran on device in incognito and regular mode, looked at logs. Review URL: http://codereview.chromium.org/4167004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64184 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-10-011-170/+161
| | | | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61142 Review URL: http://codereview.chromium.org/3575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61249 0039d316-1c4b-4281-b951-d872f2087c98
* Fix official build breakage.akalin@chromium.org2010-10-011-2/+0
| | | | | | | | | | BUG=None TEST=Tested compile with official mode flags TBR=hbono Review URL: http://codereview.chromium.org/3528007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61150 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61142 - Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-10-011-149/+185
| | | | | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127 Review URL: http://codereview.chromium.org/3575008 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/3527004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61143 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-10-011-185/+149
| | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127 Review URL: http://codereview.chromium.org/3575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61142 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61127 - Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-09-301-143/+183
| | | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Review URL: http://codereview.chromium.org/3575008 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/3606003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61129 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-09-301-183/+143
| | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Review URL: http://codereview.chromium.org/3575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61127 0039d316-1c4b-4281-b951-d872f2087c98
* [Cleanup] Consolidated duplicate definitions of DLOG.akalin@chromium.org2010-09-301-106/+98
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3551006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61113 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the most common uses of MakeCheckOpString as extern templates on gcc ↵erg@google.com2010-09-301-8/+15
| | | | | | | | | | | | | | platforms. Remove broken template specializations that were never instantiated that references extern code that doesn't exist in the project (!). BUG=none TEST=compiles, smaller binaries on linux, chromeos and mac Review URL: http://codereview.chromium.org/3594003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61092 0039d316-1c4b-4281-b951-d872f2087c98
* Removed support for log prefix filters.akalin@chromium.org2010-09-301-5/+0
| | | | | | | | | | | No one is using this, and this is obsoleted by --vmodule. BUG=56965 TEST=None Review URL: http://codereview.chromium.org/3596003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61035 0039d316-1c4b-4281-b951-d872f2087c98
* [clang] Fixed clang compile failure introduced by 60976.akalin@chromium.org2010-09-291-3/+4
| | | | | | | | | | | | Put GetVlogLevelHelper definition before GetVlogLevel definition. gcc/msvc is fine with this, but not clang (correctly). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3525006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60991 0039d316-1c4b-4281-b951-d872f2087c98