0
Commit Graph

23 Commits

Author SHA1 Message Date
jyasskin@chromium.org
81411c644a Move logging.h's definitions of operator<< into namespace std.
See the bug for a more detailed discussion of the problem when we don't make
this accessible through ADL.

BUG=391117

Review URL: https://codereview.chromium.org/367063006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281864 0039d316-1c4b-4281-b951-d872f2087c98
2014-07-08 23:03:06 +00:00
viettrungluu@chromium.org
f2c0549ecf Remove the LOG_ERROR_REPORT log severity level.
It's been unused since r255987 (which removed the --enable-dcheck flag,
among other things).

Also remove the --silent-dump-on-dcheck flag (because now there's not
even code that pretends to use it).

R=brettw@chromium.org,sky@chromium.org
BUG=352378

Review URL: https://codereview.chromium.org/331143007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277736 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-17 12:04:23 +00:00
vitalybuka@chromium.org
c914d8ae03 Extracted logging::SystemErrorCodeToString function.
Allows to use any errors, and particularly useful for logging HRESULT on Windows.

Included error code on windows into error message.

Removed unused LOG_GETLASTERROR_MODULE logging macros.

Review URL: https://codereview.chromium.org/244583002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265460 0039d316-1c4b-4281-b951-d872f2087c98
2014-04-23 01:11:01 +00:00
wangxianzhu@chromium.org
c02cb8017a Change DCHECK_IS_ON() to DCHECK_IS_ON
DCHECK_IS_ON has been a constant since r255987, and can be used in both
if() and #if. It no more needs to be in function form.

Converted 'if (DCHECK_IS_ON)' to '#if DCHECK_IS_ON' if proper.

BUG=350462
TEST=build
TBR=darin

Review URL: https://codereview.chromium.org/195973002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257156 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-14 18:39:53 +00:00
wangxianzhu@chromium.org
1a150551a6 Let DCHECK in non-official-release build be opt-in with dcheck_always_on=1 only
- Remove DCHECK in non-official-release build by default
- Gyp variable dcheck_always_on=1 (existing) forces to enable DCHECK
  in release build
- Remove flag --enable-dcheck

Other effects/notes:
- Now allow "buildtype=Official dcheck_always_on=1" (which will
  enable DCHECK in official build) combination.
- Gyp variable logging_like_official_build no longer has an effect
- Leave DCHECK_IS_ON() unchanged. May deal with it in a later change
  if needed.

This won't affect bots which use dcheck_always_on=1.

BUG=350462
TEST=LoggingTest.Dcheck
R=thakis@chromium.org
TBR=darin,sehr (command line changes in components/nacl and mojo)

Review URL: https://codereview.chromium.org/189603007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255987 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-10 18:23:38 +00:00
thakis@chromium.org
91ac35e636 Try to fix build more after r234081 / r234112.
It looks like logging.h _always_ defines LOGGING_IS_OFFICIAL_BUILD, it's
just defined to 0 or 1. So check for the value of LOGGING_IS_OFFICIAL_BUILD
instead of its definedness.

BUG=315884
TBR=akalin@chromium.org

Review URL: https://codereview.chromium.org/66213008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234115 0039d316-1c4b-4281-b951-d872f2087c98
2013-11-09 05:37:22 +00:00
thakis@chromium.org
a0fcb684c9 Try to fix official mac bot after r234081.
BUG=315884

Review URL: https://codereview.chromium.org/66513005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234112 0039d316-1c4b-4281-b951-d872f2087c98
2013-11-09 05:25:48 +00:00
cpu@chromium.org
f12e596a27 Remving global statics from the headers, so we can split-link.
The issue is that the split linker has issues with data exports vs function exports
currently only function exports are supported.

NOTRY=true
TBR=brettw,jam
TEST=none
BUG=237249

Review URL: https://chromiumcodereview.appspot.com/15403002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201194 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-21 01:42:10 +00:00
mostynb@opera.com
e5e4bfb4a6 fix gcc 4.7 compilation errors in base_unittests
Compiling base_unittests with gcc 4.7 on linux gives these errors:
../../base/logging_unittest.cc: In member function 'virtual void logging::{anonymous}::LoggingTest_BasicLogging_Test::TestBody()':
../../base/logging_unittest.cc:68:172: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../../base/logging_unittest.cc: In member function 'virtual void logging::{anonymous}::LoggingTest_LogIsOn_Test::TestBody()':
../../base/logging_unittest.cc:123:174: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../../base/logging_unittest.cc:132:174: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
../../base/logging_unittest.cc:141:174: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]

Switching from EXPECT_EQ(false, something) to EXPECT_TRUE(false == something)
fixes the problem.

Review URL: https://chromiumcodereview.appspot.com/14019004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193872 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-12 07:31:15 +00:00
akalin@chromium.org
84ddfcf4b2 Fix official build breakage introduced by 112649
BUG=107753
TEST=


Review URL: http://codereview.chromium.org/8968008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114775 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-16 06:01:23 +00:00
akalin@chromium.org
ddb9b33b95 Make CHECK not print messages in official builds
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
2011-12-02 07:31:09 +00:00
nsylvain@chromium.org
20960e074c Add a gyp flag to enable dcheck by default in release without
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
2011-09-20 20:59:01 +00:00
jeffbailey@chromium.org
998e6d9163 As of g++-4.5, the first argument to EXPECT_EQ cannot be
a constant expression.

Credit: Jeffrey Yasskin, Google.
Review URL: http://codereview.chromium.org/6691021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80270 0039d316-1c4b-4281-b951-d872f2087c98
2011-04-02 21:13:21 +00:00
akalin@chromium.org
7c10f7553b Made logging not look up --enable-dcheck from command line
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
2011-01-11 01:03:36 +00:00
akalin@chromium.org
941635a75d Revert 70920 - Made logging not look up --enable-dcheck from command line
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
2011-01-10 19:59:52 +00:00
akalin@chromium.org
3ab155c9b0 Made logging not look up --enable-dcheck from command line
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
2011-01-10 19:30:16 +00:00
akalin@chromium.org
deba0ff321 Fixed bug where CHECKs don't fire if min_log_level > FATAL
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
2010-11-03 05:30:14 +00:00
akalin@chromium.org
5e9878091b Fixed subtle difference in behavior between DCHECK and DCHECK_EQ et al.
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
2010-11-01 19:49:22 +00:00
akalin@chromium.org
521b0c4d56 Made logging macros evaluate its stream arguments lazily.
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
2010-10-01 23:02:36 +00:00
akalin@chromium.org
d926c20f25 Revert 61142 - Made logging macros evaluate its stream arguments lazily.
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
2010-10-01 02:58:24 +00:00
akalin@chromium.org
2c3229eced Made logging macros evaluate its stream arguments lazily.
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
2010-10-01 02:26:04 +00:00
akalin@chromium.org
8b78210f6a Revert 61127 - Made logging macros evaluate its stream arguments lazily.
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
2010-09-30 22:38:30 +00:00
akalin@chromium.org
f223553525 Made logging macros evaluate its stream arguments lazily.
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
2010-09-30 22:26:41 +00:00