Rodrigo Queiro [Thu, 1 Feb 2018 08:36:50 +0000 (09:36 +0100)]
Bazel: make example more portable
Rodrigo Queiro [Wed, 31 Jan 2018 13:00:25 +0000 (14:00 +0100)]
Allow using glog/stl_logging.h with Bazel
Fixes #289.
Rodrigo Queiro [Tue, 16 Jan 2018 08:20:08 +0000 (09:20 +0100)]
Add workaround for Bazel build on macOS
This works around https://github.com/bazelbuild/bazel/issues/3979,
and so closes #282.
Sergiu Deitsch [Thu, 4 Jan 2018 14:19:23 +0000 (15:19 +0100)]
cmake: remove config.h from public headers (closes #238)
Sergiu Deitsch [Thu, 4 Jan 2018 13:38:21 +0000 (14:38 +0100)]
Merge pull request #283 from Mizux/master
Use target gflags instead of old VARIABLES
Mizux [Thu, 4 Jan 2018 12:02:02 +0000 (13:02 +0100)]
Use target gflags instead of old VARIABLES
Rodrigo Queiro [Thu, 4 Jan 2018 11:00:27 +0000 (12:00 +0100)]
Merge pull request #276 from drigz/add-example
Add an example using glog from Bazel
Rodrigo Queiro [Tue, 19 Dec 2017 14:42:59 +0000 (15:42 +0100)]
Add an example using glog from Bazel
Rodrigo Queiro [Thu, 4 Jan 2018 10:29:54 +0000 (11:29 +0100)]
Merge pull request #277 from drigz/update-gflags
Update gflags to latest master
Sergiu Deitsch [Thu, 4 Jan 2018 01:37:49 +0000 (02:37 +0100)]
cmake: use gflags package config instead of a find module
This allows to avoid conflicts between third party gflags find modules floating
around. If a package provide a local version of gflags find module, clients
which locate glog will incorrectly use it. Another problem is a CMake error message
"cmake_policy PUSH without matching POP" in nested find_package calls. In summary,
we need to ensure to use the original gflags package config.
Sergiu Deitsch [Tue, 2 Jan 2018 22:36:51 +0000 (23:36 +0100)]
cmake: ensure consumers do not overwrite the required policy
Sergiu Deitsch [Tue, 2 Jan 2018 21:31:47 +0000 (22:31 +0100)]
removed obsolete vsprojects
Sergiu Deitsch [Tue, 2 Jan 2018 13:38:37 +0000 (14:38 +0100)]
cmake: added a postfix for debug builds (closes #237)
This allows to deploy debug and release builds concurrently.
Sergiu Deitsch [Tue, 2 Jan 2018 01:21:51 +0000 (02:21 +0100)]
Merge pull request #281 from sergiud/msvc-error-define
Fixed undeclared identifier error
Sergiu Deitsch [Tue, 2 Jan 2018 01:18:00 +0000 (02:18 +0100)]
logging_unittest: fixed undeclared identifier error (fixes #267)
Shinichiro Hamaji [Thu, 21 Dec 2017 10:05:40 +0000 (19:05 +0900)]
Merge pull request #278 from shinh/contrib
Update AUTHORS and CONTRIBUTORS for PR#232
Shinichiro Hamaji [Wed, 20 Dec 2017 08:27:27 +0000 (17:27 +0900)]
Update AUTHORS and CONTRIBUTORS for PR#232
Rodrigo Queiro [Tue, 19 Dec 2017 14:47:18 +0000 (15:47 +0100)]
Update gflags to latest master
This means that gflags no longer leaks config.h, so I had to fix a bug
in glog.bzl where config.h is generated at the wrong path.
I also switched to the best-practice for depending on git repositories,
ie using http_archive with a mirror.
Rodrigo Queiro [Mon, 18 Dec 2017 09:20:57 +0000 (10:20 +0100)]
Merge pull request #232 from qzmfranklin/bazel
Build with Bazel.
Zhongming Qu [Thu, 14 Dec 2017 21:45:01 +0000 (13:45 -0800)]
Remove the use of bind() from WORKSPACE.
Zhongming Qu [Thu, 14 Dec 2017 09:03:19 +0000 (01:03 -0800)]
Remove an empty textual_hdrs field.
Zhongming Qu [Thu, 14 Dec 2017 08:51:26 +0000 (00:51 -0800)]
Hide certain header files from the cc_library().
This commit addresses a few issues:
1. No longer leak config.h in a way similar to
https://github.com/gflags/gflags/issues/233
The solution of prefixing the path by 'glog_internal' is modified from
https://github.com/gflags/gflags/issues/234
2. No longer expose internal headers.
3. Replace PACKAGE_NAME with native.package_name()
4. Uers can choose namespaces via the newly added 'namespace' keyword.
5. Replace glob with explicitly listing of files.
6. Make the genrules more compact using pythonic list construction.
Zhongming Qu [Sun, 9 Jul 2017 04:38:46 +0000 (00:38 -0400)]
Can build with Bazel now
Zhongming Qu [Sun, 9 Jul 2017 04:38:46 +0000 (00:38 -0400)]
Build with Bazel.
Fumitoshi Ukai [Fri, 10 Nov 2017 07:55:27 +0000 (16:55 +0900)]
Merge pull request #261 from pcc/fix3
Compute base addresses from program headers while reading /proc/self/maps.
Peter Collingbourne [Thu, 2 Nov 2017 23:53:21 +0000 (16:53 -0700)]
Compute base addresses from program headers while reading /proc/self/maps.
We previously had logic to compute the base address from program
headers as part of symbolization. The problem is that we need a correct
base address earlier in order to adjust a PC into the image's address
space, as these addresses can appear in unsymbolized output.
There was previously an assumption that only the mapping that
was lowest in the address space did not need to be adjusted. This
assumption is not guaranteed (for example, the kernel may choose to
map an ET_DYN lowest) and in fact turned out to be wrong in binaries
linked with lld because the first mapping is read-only.
The solution is to move the program header reading logic into the
code that reads /proc/self/maps.
There is a change in semantics for clients that install a callback
using the InstallSymbolizeOpenObjectFileCallback function. Any such
clients will need to return a correct base address from the callback
by reading program headers using code similar to that in the function
OpenObjectFileContainingPcAndGetStartAddress.
Sergiu Deitsch [Sat, 4 Nov 2017 15:22:21 +0000 (16:22 +0100)]
Merge pull request #106 from dimhotepus/master
Cache strlen outside of cycles (PVS-Studio)
Shinichiro Hamaji [Tue, 31 Oct 2017 05:30:52 +0000 (14:30 +0900)]
Merge pull request #260 from ukai/shell_escape
Shell escape arguments to /bin/mail.
Fumitoshi Ukai [Tue, 31 Oct 2017 04:04:26 +0000 (13:04 +0900)]
Shell escape arguments to /bin/mail.
Shinichiro Hamaji [Fri, 20 Oct 2017 07:11:31 +0000 (16:11 +0900)]
Style fixes for consistency
Shinichiro Hamaji [Fri, 20 Oct 2017 07:09:28 +0000 (16:09 +0900)]
Merge pull request #245 from DariuszOstolski/issue211
Fix username lookup in case of missing USER environment variable
Shinichiro Hamaji [Fri, 20 Oct 2017 06:48:21 +0000 (15:48 +0900)]
Merge pull request #254 from DariuszOstolski/issue253
#253: Use MS preprocessor idiom to disable warning
Dariusz Ostolski [Wed, 18 Oct 2017 18:56:49 +0000 (20:56 +0200)]
#253: Use MS preprocessor idiom to disable warning
Shinichiro Hamaji [Wed, 11 Oct 2017 15:25:02 +0000 (00:25 +0900)]
Merge pull request #226 from sergiud/zero-allocation-log-failure
Zero allocation fix
Sergiu Deitsch [Thu, 6 Jul 2017 09:05:58 +0000 (11:05 +0200)]
fixed gcc logging failure
Dariusz Ostolski [Wed, 20 Sep 2017 16:41:07 +0000 (18:41 +0200)]
Added HAVE_PWD_H to cmake build
Dariusz Ostolski [Tue, 19 Sep 2017 20:23:53 +0000 (22:23 +0200)]
Fix username lookup in case of missing USER environment variable
Shinichiro Hamaji [Wed, 9 Aug 2017 15:06:08 +0000 (00:06 +0900)]
Merge pull request #228 from sergiud/dll-export-fix
Fix for missing exports (fixes #227)
Sergiu Deitsch [Wed, 9 Aug 2017 13:21:32 +0000 (15:21 +0200)]
added missing exports (fixes #227)
Shinichiro Hamaji [Wed, 9 Aug 2017 07:35:05 +0000 (16:35 +0900)]
Merge pull request #225 from jray272/remove-log-every-n-assert
Fix LOG_EVERY_N with clang -Wunused-local-typedef
Jim Ray [Wed, 9 Aug 2017 07:09:14 +0000 (00:09 -0700)]
Remove GOOGLE_GLOG_COMPILE_ASSERT
This compile time assert is no longer used anywhere in glog. Remove
it.
Shinichiro Hamaji [Wed, 9 Aug 2017 06:04:26 +0000 (15:04 +0900)]
Merge pull request #224 from jray272/run-windows-script
Run src/windows/preprocess.sh to pick up latest logging.h.in changes
Jim Ray [Mon, 31 Jul 2017 05:30:33 +0000 (22:30 -0700)]
Fix LOG_EVERY_N with clang -Wunused-local-typedef
Glog uses a pre-C++11 compile time assert to verify the validity of
the severity parameter for LOG_EVERY_N. Unfortunately, some compilers
will complain about the usage of LOG_EVERY_N with
"-Wunused-local-typedef" due to the way the compile time assert is
constructed. This makes it impossible to use LOG_EVERY_N with this
warning treated as an error.
The fix simply removes the assert entirely. This is safe to do since
you can't put anything invalid into the severity parameters without
generating a compile error elsewhere. This has been safe to do ever
since the GLOG_ prefixes were added as part of
6febec361e.
Fixes #223
Jim Ray [Mon, 31 Jul 2017 05:25:36 +0000 (22:25 -0700)]
Update Windows logging.h based on
2df0ca34aa
Commit changes to src/windows/glog/logging.h that were missed in
2df0ca34aa. Because a change to src/glog/logging.h.in was made,
src/windows/preprocess.sh needed to be run.
Jim Ray [Mon, 31 Jul 2017 04:38:38 +0000 (21:38 -0700)]
Add Jim Ray to CONTRIBUTORS
Shinichiro Hamaji [Tue, 1 Aug 2017 05:41:47 +0000 (14:41 +0900)]
Merge pull request #218 from andschwa/remove-sln
Update Windows docs
Andrew Schwartzmeyer [Wed, 26 Jul 2017 18:35:04 +0000 (11:35 -0700)]
Update Windows readme for CMake
Andrew Schwartzmeyer [Wed, 26 Jul 2017 18:34:52 +0000 (11:34 -0700)]
Update gitignore for CMake and Visual Studio
Andrew Schwartzmeyer [Wed, 26 Jul 2017 18:34:40 +0000 (11:34 -0700)]
Delete ancient Visual Studio Solution file.
Shinichiro Hamaji [Wed, 26 Jul 2017 08:46:57 +0000 (17:46 +0900)]
Merge pull request #216 from google/revert-120-master
Revert "configure.ac: Allow user to disable gflags"
Shinichiro Hamaji [Wed, 26 Jul 2017 08:44:25 +0000 (17:44 +0900)]
Revert "configure.ac: Allow user to disable gflags"
Shinichiro Hamaji [Wed, 19 Jul 2017 14:51:20 +0000 (23:51 +0900)]
Merge pull request #120 from ribalda/master
configure.ac: Allow user to disable gflags
Shinichiro Hamaji [Sun, 9 Jul 2017 16:53:19 +0000 (01:53 +0900)]
Merge pull request #209 from sergiud/cmake-icc-fix
cmake: fixed gflags namespace detection (fixes #193)
Sergiu Deitsch [Sun, 9 Jul 2017 00:04:17 +0000 (02:04 +0200)]
cmake: fixed gflags namespace detection (fixes #193)
This commit fixes gflags namespace detection using Intel compiler and ensures
the generated try_compile command line does not produce malformed paths.
Shinichiro Hamaji [Thu, 6 Jul 2017 06:01:10 +0000 (15:01 +0900)]
Merge pull request #153 from sergiud/cmake-gnu-install-dirs
cmake: do not hardcode relative install directories
Shinichiro Hamaji [Thu, 6 Jul 2017 06:00:37 +0000 (15:00 +0900)]
Merge pull request #152 from sergiud/cmake-project-name
cmake: changed project name from google-glog to glog
Shinichiro Hamaji [Thu, 6 Jul 2017 06:00:06 +0000 (15:00 +0900)]
Merge pull request #157 from sergiud/cygwin-support
Cygwin support
Shinichiro Hamaji [Thu, 6 Jul 2017 05:58:37 +0000 (14:58 +0900)]
Merge pull request #158 from sergiud/zero-allocation
[RFC] reduce heap memory allocations to zero
Shinichiro Hamaji [Thu, 6 Jul 2017 05:52:13 +0000 (14:52 +0900)]
Merge pull request #145 from pixelb/rate-limit-posix-fadvise
rate limit calls to posix_fadvise()
Hans-Andreas Engel [Fri, 8 Apr 2016 08:51:40 +0000 (10:51 +0200)]
reduce memory allocations to zero
Shinichiro Hamaji [Thu, 29 Jun 2017 03:36:25 +0000 (12:36 +0900)]
Merge pull request #199 from v1bri/brian-fix-gflags-link
Use gflags ALIAS instead of ${gflags_XXX} vars
Shinichiro Hamaji [Wed, 28 Jun 2017 03:31:40 +0000 (12:31 +0900)]
Merge pull request #168 from andschwa/windows-stacktrace
Port stack tracing to Windows
Andrew Schwartzmeyer [Tue, 27 Jun 2017 00:13:21 +0000 (17:13 -0700)]
Support signal handler on Windows
Andrew Schwartzmeyer [Fri, 23 Jun 2017 19:39:49 +0000 (12:39 -0700)]
Link to DbgHelp using pre-processor directive
This method ensure that all users of glog get automatically linked to
the DbgHelp library without needing to set compiler flags.
Andrew Schwartzmeyer [Thu, 25 May 2017 20:43:39 +0000 (13:43 -0700)]
Export GetStackTrace
Necessary when building with BUILD_SHARED_LIBS=1.
Andrew Schwartzmeyer [Sat, 4 Mar 2017 00:50:08 +0000 (16:50 -0800)]
Support symbolizer and demangler on Windows
Andrew Schwartzmeyer [Wed, 21 Dec 2016 21:48:58 +0000 (13:48 -0800)]
Support stacktrace on Windows
Andrew Schwartzmeyer [Tue, 20 Dec 2016 23:24:50 +0000 (15:24 -0800)]
Copy stacktrace_generic-inl.h for Windows
Andrew Schwartzmeyer [Fri, 23 Jun 2017 17:00:12 +0000 (10:00 -0700)]
Add Andrew Schwartzmeyer to authors and contributors
Brian Orr [Thu, 22 Jun 2017 18:24:58 +0000 (11:24 -0700)]
Specify gflags version in CMakeLists.txt
Brian Orr [Thu, 22 Jun 2017 07:25:13 +0000 (00:25 -0700)]
Use gflags ALIAS instead of ${gflags_XXX} vars
The gflags project updated their CMake config last year with a
`gflags` ALIAS target. This can be used instead of the legacy
`${gflags_LIBRARIES}` and `${gflags_INCLUDE_DIRS}` variables. It also
looks cleaner.
Fixes #198
Fumitoshi Ukai [Fri, 12 May 2017 05:57:09 +0000 (14:57 +0900)]
Merge pull request #188 from shinh/remove-configure
Remove files generated by autotools
closes #165
Shinichiro Hamaji [Fri, 12 May 2017 05:52:54 +0000 (14:52 +0900)]
Remove files generated by autotools
for #165. I think not many projects have them in their repo.
Shinichiro Hamaji [Wed, 10 May 2017 11:42:57 +0000 (20:42 +0900)]
Update the version in CMakeLists.txt to 0.3.5
Fumitoshi Ukai [Wed, 10 May 2017 03:51:39 +0000 (12:51 +0900)]
Merge pull request #186 from shinh/backport
Backport internal changes
Shinichiro Hamaji [Tue, 9 May 2017 08:35:18 +0000 (17:35 +0900)]
Add a hack for naive include scanners
Shinichiro Hamaji [Tue, 9 May 2017 08:22:38 +0000 (17:22 +0900)]
Define OS_LINUX only if it's not defined yet
Shinichiro Hamaji [Tue, 9 May 2017 08:21:16 +0000 (17:21 +0900)]
symbolize: Allow 4kB stack consumption on PPC64
Shinichiro Hamaji [Tue, 9 May 2017 08:11:51 +0000 (17:11 +0900)]
x86 stacktrace: Use __builtin_frame_address if possible
Shinichiro Hamaji [Tue, 9 May 2017 08:05:55 +0000 (17:05 +0900)]
Relax test for symbolize
Don't rely on an internal-linkage extern "C" function having an
unmangled name. This isn't required by the ABI, and in fact is not
valid for a conforming compiler(!). Instead, allow symbolization to
produce either a mangled or an unmangled name here.
Shinichiro Hamaji [Tue, 9 May 2017 08:01:07 +0000 (17:01 +0900)]
Use LOG(FATAL) instead of CHECK(false)
Shinichiro Hamaji [Tue, 9 May 2017 07:41:58 +0000 (16:41 +0900)]
Run src/windows/preprocess.sh
Shinichiro Hamaji [Tue, 9 May 2017 07:24:50 +0000 (16:24 +0900)]
glog: release 0.3.5
Fumitoshi Ukai [Fri, 21 Apr 2017 00:54:53 +0000 (09:54 +0900)]
Merge pull request #179 from renning22/master
CHECK_NOTNULL works with smart pointers when compiled in C++11.
Ning Ren [Thu, 20 Apr 2017 22:30:42 +0000 (15:30 -0700)]
CHECK_NOTNULL works with smart pointers when compiled in C++11.
Fumitoshi Ukai [Tue, 7 Mar 2017 03:44:37 +0000 (12:44 +0900)]
Merge pull request #169 from mayah/windows-no-return
Add __declspec(noreturn) on Win
mayah [Tue, 7 Mar 2017 02:22:24 +0000 (11:22 +0900)]
Add __declspec(noreturn) on Win
Currently cl.exe doesn't know LOG(FATAL) exits the program. Set
__declspec(noreturn).
Fumitoshi Ukai [Thu, 9 Feb 2017 02:04:00 +0000 (11:04 +0900)]
Merge pull request #164 from yoshisatoyanagisawa/dcheck_always_on
DCHECK_ALWAYS_ON to make D* enabled under NDEBUG
Yoshisato Yanagisawa [Tue, 7 Feb 2017 06:47:51 +0000 (15:47 +0900)]
DCHECK_ALWAYS_ON to make D* enabled under NDEBUG
The macro NDEBUG could be automatically defined for release build on
some build environments (e.g. MSVC). If we use NDEBUG as a key to
distinguish using DCHECK as CHECK (I call this DCHECK is enabled) or
not, we cannot make DCHECK enabled for release build on such
environments.
Considering people use a program with glog for presubmit testing or
dogfooding, they should need to do release build with DCHECK enabled.
Sergiu Deitsch [Tue, 17 Jan 2017 11:47:11 +0000 (12:47 +0100)]
fixed cygwin compilation errors
Sergiu Deitsch [Tue, 10 Jan 2017 10:34:42 +0000 (11:34 +0100)]
cmake: do not hardcode relative install directories
Sergiu Deitsch [Tue, 10 Jan 2017 10:15:18 +0000 (11:15 +0100)]
cmake: changed project name from google-glog to glog
This fixes the default install location on Windows. Specifically,
find_package works now out-of-the box with the default
CMAKE_INSTALL_PREFIX.
Pádraig Brady [Fri, 9 Dec 2016 19:45:34 +0000 (19:45 +0000)]
rate limit calls to posix_fadvise()
There can be a large kernel overhead involved in POSIX_FADV_DONTNEED.
There is no point in calling this per item logged, so rate limit
to at most once per 2MiB written.
With a simple test program that logs 100K items at WARNING level:
Before:
$ time strace -c -e fadvise64 log.test \
-log_dir=/dev/shm -logtofiles=true -logtostderr=false
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 12.522509 125 99957 fadvise64
------ ----------- ----------- --------- --------- ----------------
real 0m52.671s
user 0m2.194s
sys 0m44.022s
After:
$ time strace -c -e fadvise64 log.test \
-log_dir=/dev/shm -logtofiles=true -logtostderr=false
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000759 152 5 fadvise64
------ ----------- ----------- --------- --------- ----------------
real 0m4.206s
user 0m1.436s
sys 0m3.153s
Fixes issue #84
Ricardo Ribalda Delgado [Thu, 11 Aug 2016 09:49:36 +0000 (11:49 +0200)]
configure.ac: Allow user to disable gflags
Under some circumstances like cross-compilation, the user might not want
to enable support for gflags.
This patch allows support for --without-gflags
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Fumitoshi Ukai [Thu, 20 Oct 2016 06:52:27 +0000 (15:52 +0900)]
Update github.com/sergiud in AUTHORS/CONTRIBUTORS
Fumitoshi Ukai [Wed, 19 Oct 2016 07:40:55 +0000 (16:40 +0900)]
Merge pull request #132 from sergiud/cmake-disable-unittests
cmake: allow to disable building unit tests
Sergiu Deitsch [Wed, 19 Oct 2016 07:28:19 +0000 (09:28 +0200)]
cmake: allow to disable building unit tests
This commit introduces a CMake `BUILD_TESTING` boolean option that
allows to disable unit tests. This is especially useful in superbuilds
where typically only the main library is built. By default, this option
is enabled.
Fumitoshi Ukai [Wed, 19 Oct 2016 07:29:34 +0000 (16:29 +0900)]
Merge pull request #127 from MinGW-caffe/master
try to avoid the error "conflicting declaration 'typedef DWORD pthread_t'" etc. in MinGW
Fumitoshi Ukai [Wed, 19 Oct 2016 07:28:53 +0000 (16:28 +0900)]
Add MiniLight to AUTHORS/CONTRIBUTORS
Fumitoshi Ukai [Wed, 19 Oct 2016 07:10:39 +0000 (16:10 +0900)]
Merge pull request #123 from yying/master
Set sinks_ to NULL after deletion in LogDestination::DeleteLogDestinations