M Samoila
43fc3bf91c
Add log_year_in_prefix flag
...
The flag allows suppressing the year in the log line prefix. At the same
time, the flag allows to generate log output compatible to glog releases
prior to version 0.5.
2021-12-23 21:43:23 +01:00
Sergiu Deitsch
42d509b1c3
revert to int atomics
2021-12-23 17:41:29 +01:00
Sergiu Deitsch
4ffa98388f
ensure _Unwind_Backtrace to actually be available
2021-12-21 11:38:12 +01:00
Sergiu Deitsch
087ad5bf32
eliminated clang warnings
2021-12-21 11:37:49 +01:00
Sergiu Deitsch
9dc1107f88
run clang-tidy
2021-12-15 12:04:34 +01:00
Sergiu Deitsch
dfb9ffc324
provide backward compatible send overload
2021-12-15 11:14:23 +01:00
Marco Wang
d09b999f34
LogCleaner: make overdue_days_ unsigned int
...
Since the value of `LogCleaner::overdue_days_` should be >= 0,
we can simply make it an unsigned int which also avoids
unnecessary assertions.
Signed-off-by: Marco Wang <m.aesophor@gmail.com>
2021-12-13 19:00:07 +01:00
Sergiu Deitsch
baa7006e63
ci: enable warnings as errors
2021-12-10 20:10:17 +01:00
Sergiu Deitsch
660352f02b
cmake: require at least version 3.16 ( fixes #705 )
2021-12-09 19:01:27 +01:00
Sergiu Deitsch
52354b2adc
eliminate msvc warnings
2021-12-09 11:51:46 +01:00
Marco Wang
ccbda2dfd5
LogCleaner: Fix relative paths and add a new test
...
Signed-off-by: Marco Wang <m.aesophor@gmail.com>
2021-12-09 10:30:51 +01:00
Vijaymahantesh Sattigeri
ef36f800ed
Added an API to get GMT offset from LogMessageTime
...
* Added API to get GMT offset
* Made LogMessageTime as a memeber of LogMessage
* Refactored LogSink::send() method
2021-12-09 10:26:47 +01:00
Sergiu Deitsch
f4dd77ae6b
ci: reworked windows builds
2021-12-06 19:00:41 +01:00
Sergiu Deitsch
65199ed0b8
protect VLOG by use_logging
2021-11-18 00:01:33 +01:00
Johannes Meyer
33696664cb
restore the stream format after writing the log prefix ( #731 )
...
* Fix MungeLine() for log lines that are longer than 5 characters
* Match order of log statements in logging_unittest.cc and logging_unittest.err
* Update logging_custom_prefix_unittest.cc and logging_custom_prefix_unittest.err to match logging_unittest.cc and logging_unittest.err
* Save the stream state and set the fill character before calling into a custom_prefix_callback
2021-11-05 22:29:36 +01:00
Marco Wang
c27c3a803b
make LogCleaner support relative paths
2021-10-29 23:04:42 +02:00
Sergiu Deitsch
3362cc6c79
added log cleaner tests and fixed paths
2021-10-29 22:45:55 +02:00
Sergiu Deitsch
1398762db8
added mock log test
2021-10-12 14:36:33 +02:00
Sergiu Deitsch
4a55b11580
ci: added linux github workflow
2021-10-11 15:54:42 +02:00
huangqinjin
3965584721
support stack unwind on Android
2021-10-08 22:14:20 +02:00
Sergiu Deitsch
8474b7854b
added gmock support
2021-10-07 19:53:08 +02:00
Sergiu Deitsch
f7407d4d27
export OS_* defines ( fixes #715 )
2021-10-01 11:26:07 +02:00
Tongliang Liao
2412db3158
raw_logging.h depends on type definition in logging.h.
...
Resolve https://github.com/google/glog/issues/712
2021-09-24 12:51:15 +02:00
kinsei0916
3b6b05d70b
Use __EMSCRIPTEN__ instead of __USE_POSIX2
2021-09-20 22:14:58 +02:00
kinsei0916
de81bb0aac
Fix link error for Emscripten
2021-09-20 22:14:58 +02:00
David Freese
ffb40018a5
Change size type in AnnotateBenignRaceSized to size_t from long
...
This makes this definition consistent with Abseil's declarations. See:
https://github.com/abseil/abseil-cpp/blob/master/absl/base/dynamic_annotations.h#L213-L215
Having this unsigned seems to match what libsanitizers is expecting:
16e2427f50/libsanitizer/tsan/tsan_interface_ann.cpp (L367-L371)
This solves a "conflicting declaration of C function" when using glog
with abseil.
2021-09-03 09:51:46 -07:00
六岁小少年
df95749e83
Fix: not implement virtual class when WITH_CUSTOM_PREFIX on
2021-08-12 16:40:52 +08:00
Sebastian Hahn
9fce37c464
Add a static cast to compare unsigned with unsigned
2021-08-09 10:15:07 +02:00
Sergiu Deitsch
92cb3c449b
fixed additional warnings
2021-08-01 17:12:21 +02:00
Sergiu Deitsch
0b83bb203d
eliminate warnings
2021-07-22 22:52:22 +02:00
Sergiu Deitsch
717f569835
fixed exception specification mismatch
2021-07-14 19:37:05 +02:00
z-aki
4a4331f2f2
Fix syscall deprecation warning on macOS >= 10.12
...
Fix #185
2021-07-14 19:51:19 +05:30
Sergiu Deitsch
c39fcf6e8a
ci: added more targets
2021-07-14 02:21:58 +02:00
Dmitriy A
a1374c4200
Implement LOG_EVERY_T.
...
Use <chrono> and <atomic> for C++11 or greater.
For non-Windows pre-C++11 systems, use <time.h> and built-in atomic operations.
For Windows pre-C++11, use the Windows implementations for time and atomic operations.
2021-07-05 07:25:12 -07:00
Sergiu Deitsch
d25a1b7bc0
cmake: export <atomic> availability ( fixes #667 )
2021-06-15 18:36:24 +02:00
Roman Gershman
86fea1ab25
Allow updating vmodule levels after vmodule was parsed, invalidate already cached site flags
...
vmodule flag is relevant for GNUC environments only.
2021-05-23 19:38:22 +03:00
Tongliang Liao
81e0d616ed
Expose IsGoogleLoggingInitialized() in public API.
...
Usually library does not have control of the process lifespan.
Without this function, it is impossible to init/shutdown reliably.
It has been one of the major pain points for years when using glog in libraries.
AFAIK 3 workarounds have been used previously:
1. Init without checking. This causes compatiblity issues with other libs using glog.
2. Also provide a init function in library's API. This makes API complicated and stateful, especially for libs that does not mean to stay for the entire life of process.
3. Steal the utility function in internal namespace. Does not work with msvc (due to missing dllexport) or `gcc -fvisibility=hidden`.
None of them are perfect, except for the last hack that usually works well on Linux.
0.5.0 changes default visibility to hidden and it does not work anymore.
Resolve https://github.com/google/glog/issues/125
2021-05-14 08:57:32 +08:00
Sergiu Deitsch
0efaa59a75
Merge pull request #641 from sergiud/nullptr
...
CHECK support for nullptr (fixes #341 )
2021-04-12 10:08:28 +02:00
Sergiu Deitsch
230da316c5
Merge pull request #637 from xiaobfly/master
...
fix LogCleaner::IsLogFromCurrentProject for filename_extension
2021-04-11 15:20:57 +02:00
Sergiu Deitsch
762a2a7ee1
eliminated gflags related linker warnings ( #569 )
2021-04-11 14:24:41 +02:00
Santiago Gil
0cbc235297
Add support for setting a custom prefix format
2021-04-09 20:11:44 +02:00
Bret McKee
c7656c3ec1
CHECK support for nullptr ( fixes #341 )
...
This allows CHECK_NE(foo, nullptr) to compile and produces "nullptr" for the
string representation of nullptr.
2021-04-09 20:10:08 +02:00
Sergiu Deitsch
663bb26960
Merge pull request #620 from sergiud/cmake-allow-to-disable-symbolize
...
cmake: allow to disable symbolize
2021-04-09 15:06:36 +02:00
Sergiu Deitsch
efc341d768
fixed windows builds
2021-04-08 18:16:42 +02:00
Sergiu Deitsch
39e83581de
cmake: allow to disable symbolize
2021-04-07 22:59:46 +02:00
xiaobfly
635a078180
fix LogCleaner::IsLogFromCurrentProject for filename_extension
2021-04-07 17:42:52 +08:00
Sergiu Deitsch
7d60d6e04b
removed windows specific headers
2021-04-06 19:59:47 +02:00
xiaobfly
4fca1b9673
fixed filename extension
2021-04-01 17:21:19 +08:00
Sergiu Deitsch
7f8a48b3bf
Merge pull request #595 from r-barnes/richard/ctr_type_fix
...
Change counter type to uint64
2021-03-31 09:43:14 +02:00
Richard Barnes
bf3e5a80ae
Change counter type to uint64
2021-03-31 02:28:29 +02:00