Sergiu Deitsch
4f09bed0b4
Merge pull request #263 from kennyyu/tsan_benign_race
...
Annotate LOG_EVERY_N macros as a benign race for TSAN
2021-02-13 11:55:42 +01:00
Sergiu Deitsch
7bba6030c2
Merge pull request #592 from aesophor/fix-logcleaner-file-ext
...
src/logging.cc: Make LogCleaner aware of filename extension (#589 )
2021-02-13 11:48:23 +01:00
Sergiu Deitsch
7a8b66aa17
Merge pull request #593 from aesophor/fix-typo
...
src/logging.cc: Fix a typo in comment
2021-02-13 11:46:55 +01:00
Sergiu Deitsch
6d5da21549
Merge pull request #608 from mahiuchun/stl
...
Make stl_logging_unittest more robust.
2021-02-13 11:43:16 +01:00
Hill Ma
15d51a17cc
Make stl_logging_unittest more robust.
2021-02-08 21:16:29 -08:00
Marco Wang
fe1287dd5d
src/logging.cc: Fix a typo in comment
...
Signed-off-by: Marco Wang <m.aesophor@gmail.com>
2020-10-10 00:06:11 +08:00
Marco Wang
431d74c802
src/logging.cc: Make LogCleaner aware of filename extension ( #589 )
...
Previously, LogCleaner::IsLogFromCurrentProject() did not consider
the custom file extension set with SetLogFilenameExtension().
This PR fixes it.
Signed-off-by: Marco Wang <m.aesophor@gmail.com>
2020-10-09 22:40:12 +08:00
Sergiu Deitsch
c8f8135a57
Merge pull request #502 from aesophor/encapsulate-log-cleaner
...
src/logging.cc: encapsulate log cleaner, match logfile with <base_filename_><date>-<time>.<pid>
2020-10-03 09:52:36 +02:00
Marco
d82641f709
Merge branch 'master' into encapsulate-log-cleaner
2020-10-03 09:52:23 +08:00
Sergiu Deitsch
cec37e1cf5
Merge pull request #542 from xulongwu4/master
...
Use NULL to indicate uninitialized VLOG_IS_ON site.
2020-10-03 01:12:22 +02:00
Sergiu Deitsch
c5dcae8306
Merge pull request #467 from sukill/master
...
declare FLAGS_vmodule
2020-10-03 00:58:19 +02:00
Sergiu Deitsch
b30a009faa
Merge pull request #585 from sergiud/remove-drop-autoconf-support
...
remove autoconf support
2020-10-03 00:49:36 +02:00
Sergiu Deitsch
b539557b36
removed autoconf support
2020-10-02 20:32:41 +02:00
Sergiu Deitsch
d516278b1c
Merge pull request #540 from pwnall/fix-uv-warn
...
Fix unused parameter warning on gcc.
2020-10-01 10:45:55 +02:00
Victor Costan
6c0a5fcb53
Fix unused parameter warning on gcc.
2020-09-30 00:53:10 -07:00
Sergiu Deitsch
f28ae960c3
Merge pull request #573 from msamoila/msamoila-use-utc-time
...
Add FLAGS_log_utc_time; when 'true' the time will be written in log in UTC, resolves #571
2020-09-29 22:25:02 +02:00
Sergiu Deitsch
fa0d50f9fc
Merge pull request #570 from jiuqiant/patch-1
...
Connect glog to Andorid logging API
2020-09-29 22:22:12 +02:00
Sergiu Deitsch
fcc9da24a6
Merge pull request #545 from julianaito/master
...
OpenBSD/powerpc: clang does not define _CALL_*, use proper ifdef instead
2020-09-29 22:19:20 +02:00
Sergiu Deitsch
40ab822812
Merge pull request #438 from d-uspenskiy/master
...
Add extra information in log file header (application build/version, actual duration time)
2020-09-29 22:18:24 +02:00
Sergiu Deitsch
4c5a60c3c3
Merge pull request #551 from aesophor/replace-sprintf
...
Replace sprintf() with snprintf() (#536 )
2020-09-29 22:12:45 +02:00
Sergiu Deitsch
8ee2bb5b31
Merge pull request #553 from huangqinjin/android
...
Output to logcat on Android
2020-09-29 22:11:54 +02:00
Sergiu Deitsch
024b095d7e
Merge pull request #552 from huangqinjin/master
...
Make message text null-terminated
2020-09-29 22:11:22 +02:00
Sergiu Deitsch
d442460690
Merge pull request #579 from arj-fb/safety_check_at_SymbolizeAndDemangle
...
Added check for if info.dli_sname is NULL
2020-09-29 22:10:08 +02:00
Sergiu Deitsch
5bc1e1177c
Merge pull request #580 from Yicong-Huang/patch-1
...
Make cmake build on path with spaces.
2020-09-29 22:09:21 +02:00
Sergiu Deitsch
af4df08e5b
Merge pull request #576 from santigl/santigl/streambuf-overflow-override
...
Remove `virtual` from `LogStreamBuf::overflow()`
2020-09-29 22:07:56 +02:00
Santiago Gil
7258189847
Add override to LogStreamBuf::overflow()
...
Prevents warnings such as:
```
glog/logging.h:1122:20: error: ‘virtual
std::basic_streambuf<char>::int_type
google::base_logging::LogStreamBuf::overflow(std::basic_streambuf<char>::int_type)’
can be marked override [-Werror=suggest-override]
virtual int_type overflow(int_type ch) {
^~~~~~~~
```
Signed-off-by: Santiago Gil <santiago.gil@codethink.co.uk>
2020-09-24 10:48:00 +01:00
Yicong Huang
c652590d84
Update CMakeLists.txt
...
wrap the path with double quotation so that it can build on path with spaces.
2020-09-15 22:22:13 -07:00
Arjun Moudgil
e5ef2728bd
Added check for if info.dli_sname is NULL
...
Check if info.dli_sname is NULL,
If the image containing addr is found, but no nearest symbol was found, the dli_sname and dli_saddr fields are set to NULL.
2020-09-15 20:46:35 -04:00
M Samoila
909069ea82
Add FLAGS_log_utc_time; when 'true' the time will be written in log in UTC
2020-09-01 10:55:53 -07:00
Jiuqiang Tang
64650ef2ed
Connect glog to Andorid logging API
...
In LogMessage::Flush(), write to __android_log_write() so that the messages can be seen via "adb logcat".
This is already a patch in the Google MediaPipe's repo: https://github.com/google/mediapipe/blob/master/third_party/com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff .
2020-08-21 20:24:00 -07:00
Phillipp Schoppmann
0a2e5931bd
Fix build for Emscripten ( #546 )
...
Add back config_setting for WASM (no HAVE_SYSCALL_H)
Since there is no config_setting for Linux
(https://github.com/bazelbuild/bazel/issues/11107 ), Linux needs to be
the default case.
2020-05-13 09:36:55 +09:00
huangqinjin
0a12a96cee
Output to logcat on Android
2020-05-11 23:59:00 +08:00
huangqinjin
d8998fe4f6
Make message text null-terminated
2020-05-11 22:33:17 +08:00
Marco Wang
2e87f98fe4
Replace sprintf() with snprintf() ( #536 )
...
sprintf poses two security risks:
(1) write to memory where it shouldn't
(2) read from memory where it shouldn't
This commit replaces the use of sprintf() with snprintf()
which has a size parameter to ensure the problems mentioned
above won't take place.
2020-05-08 14:50:55 +08:00
Charlène Wendling
7001ab9ecb
OpenBSD/powerpc: clang does not define _CALL_* use proper ifdef
...
OpenBSD/macppc uses now clang by default and does not define _CALL_SYSV,
use the alternative for such platforms.
2020-04-27 15:50:32 +02:00
Longwu Ou
4a82a856d2
Use NULL to indicate uninitialized VLOG_IS_ON site.
2020-04-26 22:57:58 -04:00
Doug Rabson
3ba8976592
fix bazel build for freebsd
2020-03-25 10:17:39 +01:00
Dmitry Uspenskiy
ceb7163880
Add extra information in log file header (application build/version, actual duration time)
2020-03-25 09:55:32 +01:00
Sergiu Deitsch
28321d8959
Merge pull request #503 from alexsmac/fix-custom-logger-deletion
...
Fix missing deletion of custom Logger
2020-03-25 09:52:26 +01:00
Marco
5b4fb63d27
Prepend the year to each glog line ( #516 ) ( #530 )
...
* Prepend the year to each glog line (#516 )
This PR fixes issue #516 by prepending the year to each glog line.
Previous format of each line in a log file:
[IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
New format:
[IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
* Fix logging_unittest for PR #530
Since the format of each glog line has been changed,
the logging_unittest must also be updated.
2020-03-25 09:36:28 +01:00
Sergiu Deitsch
7da49d48a3
Merge pull request #515 from segfaulthunter/doc
...
Explain log levels.
2020-03-25 09:10:52 +01:00
Lily
940335d82f
Add vcpkg installation instructions ( #517 )
...
Add vcpkg installation instructions
2020-03-25 09:08:16 +01:00
Sergiu Deitsch
dfc0e441c5
Merge pull request #523 from edbaunton/cmake-have-symbolize
...
Allow CMake user to disable Symbolize functionality
2020-03-25 09:05:22 +01:00
Ed Baunton
eb13e4f67c
Allow CMake user to disable Symbolize functionality
...
Currently the user has to rely on the HAVE_SYMBOLIZE detection inside
CMakeLists.txt without having any control over whether it should be used.
Add support for disabling HAVE_SYMBOLIZE at configure time so user can specify
`cmake -DHAVE_SYMBOLIZE=0`.
Signed-off-by: Ed Baunton <ebaunton1@bloomberg.net>
2020-02-15 17:16:14 -05:00
Michael
195d416e3b
Add target existence checks to Unwind find module ( #518 )
...
* Add target existence checks to Unwind find module
The build systems of projects depending on Glog may call the Unwind find
module multiple times. In these cases, the current unwind find module tries
to create a duplicate unwind::unwind target, crashing the build. This
patch adds an existence check before target creation to fix this issue.
Signed-off-by: Michael Darr <mdarr@matician.com>
* Alphabetize contributor list
* Fix inconsistent CMake style
Signed-off-by: Michael Darr <medarr@email.wm.edu>
2020-01-17 09:17:28 +01:00
Florian Mayer
74076bebc3
Explain log levels.
2020-01-10 10:50:12 +00:00
Michael Spang
130a3e10de
Use file offsets in traces if object has no symbols ( #513 )
...
Fallback to using file offsets if no symbol is found, like we do if the
object could not be opened.
This makes backtraces usable even if objects in the trace are stripped,
since the trace can be symbolized by post-processing it with a tool like
asan_symbolize.py.
Note that this is not currently compatible with SymbolizeCallback as
this overwrites the filename in the buffer. The behavior is unchanged
in that case.
Closes : #514
2020-01-08 15:34:39 +09:00
Shinichiro Hamaji
445af7ef7e
Merge pull request #508 from xiaosuo/close
...
Don't call close(2) more than once
2019-12-24 11:38:26 +09:00
Changli Gao
a35e612c55
Don't call close(2) more than once
...
Don't call close(2) more then once, even though close(2) returns -1.
See the manual page for details.
2019-12-21 23:24:28 +08:00
Marco Wang
36fa99ba2c
src/logging.cc: check the entire filename format
2019-12-09 08:48:41 +08:00