summaryrefslogtreecommitdiffstats
path: root/base/logging.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove an unused logging function.thestig@chromium.org2010-03-111-7/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/862002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41325 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r40289: "Add support for CHECK_* macros.""willchan@chromium.org2010-03-021-40/+75
| | | | | | | | Make sure DEFINE_CHECK_OP_IMPL isn't omitted for official builds. Review URL: http://codereview.chromium.org/661325 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40327 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r40289: "Add support for CHECK_* macros."willchan@chromium.org2010-03-011-60/+26
| | | | | | | | Broke official build compilation (only worked on debug/release builds). Review URL: http://codereview.chromium.org/661298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40296 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for CHECK_* macros.willchan@chromium.org2010-03-011-26/+60
| | | | | | | | Convert a few places to make sure it works. Review URL: http://codereview.chromium.org/660221 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40289 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to base/ from a combination of FreeBSD and OpenBSD patches.evan@chromium.org2009-12-291-1/+1
| | | | | | Review URL: http://codereview.chromium.org/495002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35321 0039d316-1c4b-4281-b951-d872f2087c98
* Make POSIX SIGTERM/SIGINT/SIGHUP handler async signal safe.willchan@chromium.org2009-12-081-0/+11
| | | | | | | | | | * Don't use LOG/CHECK. Replace with RAW_LOG/DCHECK (newly added to logging.h) * Don't directly post a task to the UI loop. Write to a magic pipe. Read this from a separate thread which will post to a task to the UI loop. BUG=http://crbug.com/29240 Review URL: http://codereview.chromium.org/460094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34036 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate the base logging with Event Tracing for Windows. This allows ETW ↵siggi@chromium.org2009-11-251-0/+7
| | | | | | | | | | | to control the log level and log feature flags from outside the process, and all log messages can be transported into ETW trace sessions.As is this provides an event trace provider class thatmanages the log level on control callbacks and shunts the formatted log messages to ETW when warranted.The provider observes one feature flag, which when turned on causes it to capture and log a stack trace at the log site, which can be helpful when diagnosing errors from logs.This CL also initializes ETW logging for chrome.dll, but only if the environment variable "CHROME_ETW_LOGGING" is set. The ETW machinery may create a thread in every process registering a trace provider, and the environment variable makes this overhead optional. TEST=Unittests in this change BUG=none Review URL: http://codereview.chromium.org/413006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33066 0039d316-1c4b-4281-b951-d872f2087c98
* Add logging macros that automatically append the last system error in string ↵tschmelcher@chromium.org2009-10-091-8/+170
| | | | | | | | | | | | | form. Also add thread-safe, portable variants for strerror() and strerror_r() on POSIX so that existing error logging code that calls strerror() for something other than LOG, LOG_IF, or CHECK can be changed to use safe versions too. After this CL I will eliminate all unsafe uses of strerror() in our code. TEST=Linux: tested PLOG and DPLOG with both a valid error and invalid error on a dbg build with both the default strerror_r implementation (GNU) and the other one (POSIX) via some throw-away macro evilness, and also tested the default strerror_r again on an opt build to verify DPLOG is a no-op; Windows: tested PLOG and DPLOG with both a valid error and invalid error on a dbg build; also tested LOG_GETLASTERROR_MODULE with winhttp and ERROR_WINHTTP_CANNOT_CONNECT and verified that it prints the correct system message and that it doesn't with PLOG; also tested LOG_GETLASTERROR_MODULE with a bogus module name and verified that it prints an error that it can't find the module, and the original error; Mac: none (implicitly tested via the Linux POSIX tests); trybots for Win, Mac, and Linux 32-bit; built locally for Linux 32-bit and 64-bit and tested base_unittests and also running Chromium itself; wrote the upcoming CL that switches strerror() calls to use PLOG and verified that it builds and works for both Linux 32-bit and Linux 64-bit; lint BUG=none Review URL: http://codereview.chromium.org/265052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28632 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 28166.ojan@chromium.org2009-10-061-142/+8
| | | | | | Review URL: http://codereview.chromium.org/242167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28170 0039d316-1c4b-4281-b951-d872f2087c98
* Add logging macros that automatically append the last system error in string ↵tschmelcher@google.com2009-10-061-8/+142
| | | | | | | | | | form. TESTED=Linux: tested PLOG and DPLOG with both a valid error and invalid error on a dbg build with both the default strerror_r implementation (GNU) and the other one (POSIX) via some throw-away macro evilness, and also tested the default strerror_r again on an opt build to verify DPLOG is a no-op; Windows: tested PLOG and DPLOG with both a valid error and invalid error on a dbg build; also tested LOG_GETLASTERROR_MODULE with winhttp and ERROR_WINHTTP_CANNOT_CONNECT and verified that it prints the correct system message and that it doesn't with PLOG; also tested LOG_GETLASTERROR_MODULE with a bogus module name and verified that it prints an error that it can't find the module, and the original error; Mac: none (implicitly tested via the Linux POSIX tests) Review URL: http://codereview.chromium.org/255093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28166 0039d316-1c4b-4281-b951-d872f2087c98
* Omit DLOGs and DCHECKs from release-mode Google Chrome-branded builds onmark@chromium.org2009-08-201-5/+15
| | | | | | | | | | | | | non-Windows. They were previously omitted on Windows official builds only. BUG=16512 TEST=DCHECK logging unavailable in official builds; Mac .app shrinks by about 740kB; Mac .dmg shrinks by about 315kB; Linux binary and package shrink by similar amounts Review URL: http://codereview.chromium.org/171093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23791 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 20497.thomasvl@chromium.org2009-07-161-5/+1
| | | | | | | BUG=16512,16871 Review URL: http://codereview.chromium.org/149765 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20889 0039d316-1c4b-4281-b951-d872f2087c98
* OFFICIAL_BUILD is only set in windows builds, so add some complexity to get ↵thomasvl@chromium.org2009-07-131-1/+5
| | | | | | | | | | | | the logging turned off the mac/linux builds as intended. The referenced bug will stay open since this probably shouldn't be the long term fix. BUG=16512 TEST=logging shows up for debug builds, but all platforms don't have logging in official builds. Review URL: http://codereview.chromium.org/149534 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20497 0039d316-1c4b-4281-b951-d872f2087c98
* Prototype implementation of zygotes. dkegel@google.com2009-06-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limitations that need addressing still: - Doesn't forcibly terminate children that should have exited but haven't Enable with env var ENABLE_ZYGOTE_MANAGER=1. BUG=11841 TEST= start the browser, then make chrome and all .pak files unreadable; or alternately, start an installed browser, and uninstall the browser while it's running. Then create a new tab and browse to two new sites. Here's an example script to hide and unhide the .pak files (note: do not move the directory they're in, that doesn't work): #!/bin/sh chmod_all() { chmod $1 sconsbuild/Debug/chrome for path in . locales obj/chrome/app/intermediate/repack obj/global_intermediate/* themes do chmod $1 sconsbuild/Debug/$path/*.pak done } case $1 in hide) chmod_all 000 ;; show) chmod_all 755 ;; esac Review URL: http://codereview.chromium.org/115773 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17840 0039d316-1c4b-4281-b951-d872f2087c98
* Save and restore the value of GetLastError() when [D]LOG/[D]CHECK etc on ↵tommi@google.com2009-04-141-0/+19
| | | | | | | | | | Windows. Also for log levels higher than INFO, the value of GLE is tagged onto the log message. Review URL: http://codereview.chromium.org/73010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13667 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a minor spelling typo.ericroman@google.com2009-04-101-1/+1
| | | | | | Review URL: http://codereview.chromium.org/67045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13524 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/scoped_ptr.h. Reduce usage from ~800 files ↵thestig@chromium.org2009-03-131-1/+0
| | | | | | | | to ~400. Review URL: http://codereview.chromium.org/46039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE.maruel@google.com2009-03-051-1/+3
| | | | | | | Split the lines >80 cols. (Part 1) Review URL: http://codereview.chromium.org/39206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11032 0039d316-1c4b-4281-b951-d872f2087c98
* Change the behavior of --enable-dcheck in releasehuanr@chromium.org2009-02-121-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | build from crashing to logging the failure and continuing. In addition, - In interactive mode, we will display a message box so the user can either click OK and continue or attach a debugger. - If Chrome is running in test environment, it has the option to overide the default behavior and suppress the error dialog. To support this, a new severity level ERROR_REPORT is added. In addition, DFATAL is now mapped to ERROR_REPORT instead of ERROR. The only usage of DFATAL is in ssl_client_socket_nss.cc. Add wtc for code review. Review URL: http://codereview.chromium.org/21216 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9633 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure variables are referenced in CHECK macros, even for official builds.deanm@chromium.org2009-01-261-11/+13
| | | | | | | | | | | | | | Previously the GCC based builds couldn't build with OFFICIAL_BUILD, since code like: bool success = Something(); DCHECK(success); Would result in a compile warning (treated as error) about success being unused. Review URL: http://codereview.chromium.org/18747 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8630 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DCHECKS from official builds.rvargas@google.com2008-12-111-2/+60
| | | | | | | | | | | | | | | We keep the current behavior for regular builds: - debug: DCHECKS enabled. - release: DCHECKS present but inactive; can be activated through the command line. Now we add a new behavior for official builds: - dchecks optimized away. B=4555 Review URL: http://codereview.chromium.org/13231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6830 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an inaccurate comment.evanm@google.com2008-11-181-1/+2
| | | | | | | Review URL: http://codereview.chromium.org/11221 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5588 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using the message loop rather than gtk_main().agl@chromium.org2008-10-301-2/+10
| | | | | | | | | | | Include more code from the main test_shell.cc into the GTK version. Wherever possible the code has been copied and pasted in directly to make the future merge easy. Review URL: http://codereview.chromium.org/8670 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4255 0039d316-1c4b-4281-b951-d872f2087c98
* Move NOTIMPLEMENTED() macro from "base/notimplemented.h" into "base/logging.h".ericroman@google.com2008-08-251-0/+34
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1300 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add defines for the size of wchar_t to build_config.h. Use this in places ↵brettw@google.com2008-08-071-8/+9
| | | | | | | | | | where we currently have an OS-specific check. Remove all WIN32 ifdefs from base and replace them with proper defined(OS...). I also fixed random style bits when I encountered them. I made major style fixes to string16. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@524 0039d316-1c4b-4281-b951-d872f2087c98
* Revert change 430 because it breaks the build.nsylvain@google.com2008-08-061-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@437 0039d316-1c4b-4281-b951-d872f2087c98
* Changes for POSIX support. Yay for ifdefs!pinkerton@google.com2008-08-061-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@430 0039d316-1c4b-4281-b951-d872f2087c98
* Fix most issues when building base as a x64 target.maruel@google.com2008-07-301-1/+2
| | | | | | BUG=1282556 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+523
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98