google-glog 0.7.0
In this release, glog underwent a major overhaul to take advantage of C++14 language and library features. Among the many changes, the public API has also been extended to use the more up-to-date standard library types (notably chrono
).
Highlights
- C++14 is now the primary language standard
- Emscripten support
- Many fixes and enhancements
Compatibility
glog aims to maintain source compatibility with the previous release. We did our best to ensure such compatibility in this version as well. However, downstream clients must recompile against the new glog version due to ABI incompatible changes.
Deprecations
A number of functions, methods, and types have been deprecated in favor of more uniform interface.
Warning
Deprecated methods will be removed in glog 0.8.0. Please make sure to update your code.
google::LogMessage::getMessageTime
has been superseded bygoogle::LogMessage::time
.google::LogMessageTime::timestamp
has been superseded bygoogle::LogMessageTime::when
.google::LogMessageTime::gmtoff
has been superseded bygoogle::LogMessageTime::gmtoffset
.google::EnableLogCleaner(unsigned)
has been superseded bygoogle::EnableLogCleaner(std::chrono::minutes)
.google::LogSink::send
acceptingstd::tm
(deprecated since glog 0.6.0) has been superseded bygoogle::LogSink::send
to acceptgoogle::LogMessageTime
instead.google::LogMessageInfo
and the custom prefix callback accepting this type have been superseded bygoogle::LogMessage
. To customize the log line prefix use thegoogle::InstallPrefixFormatter
function instead of thegoogle::InitGoogleLogging
overload.
Further changes
google::LogSeverity
has been converted to an unscopedenum
. This can result in compilation issues if implicit conversion between anint
andgoogle::LogSeverity
was erroneously assumed.- By default, CMake no longer generates the undocumented and untested pkg-config files. The support is now opt in which requires the CMake option
WITH_PKGCONFIG
to be explicitly set toON
.
What's Changed
- bazel: Use glog 0.6.0 in README. by @xiaoxq in #831
- Strip only the first leading @ in repo name by @meteorcloudy in #832
- fix: Fix warning about redefining STDC_HEADERS by @joeyparrish in #835
- support ndk r25 by @sergiud in #844
- added emscripten support by @sergiud in #846
- simplify DLOG macro definition in NDEBUG mode by @lstaroth in #830
- windows: call to FormatMessage() should _IGNORE_INSERTS by @anpol in #849
- log_file_header: add option to disable log file headers. by @anpol in #850
- SetLogger should delete previously set custom logger. by @anpol in #853
- logsink: fix multiple issues with LogSink::ToString() by @anpol in #852
- Fix broken stacktrace by @marekcirkos in #851
- Revert "simplify DLOG macro definition in NDEBUG mode" by @sergiud in #855
- Remove symbolize Bazel test by @drigz in #860
- Disable cc toolchain resolution when using Clang on Windows by @comius in #863
- Fix Windows clang CI for CC toolchain resolution by @jsharpe in #877
- ci: run linux workflow on ubuntu 22.04 by @sergiud in #885
- ci: update actions by @sergiud in #886
- fixed emscripten detection by @sergiud in #897
- drop lgtm badges by @sergiud in #899
- avoid anonymous struct typedefs by @sergiud in #900
- cmake: rename glogbase to glog_internal by @sergiud in #901
- drop custom prefix option by @sergiud in #898
- Adds fuzz testing for demangle by @catenacyber in #878
- [docs] Add Conan usage on README by @uilianries in #862
- ci: includ CIFuzz GitHub workflow by @catenacyber in #903
- Fix empty stack trace when use bazel on aarch64 by @noaxp in #905
- move to C++14 by @sergiud in #902
- Fixes for OpenBSD by @brad0 in #921
- Fix targets for layering_check by @mai93 in #916
- Fix spelling mistakes by @Vertexwahn in #919
- logging: Prevent LogStream constructor from being discarded by @ekilmer in #925
- Warn about dragons in the Bazel
include
path by @drigz in #927 - chore(docs): fix typo in conan install step in readme by @pravinba9495 in #946
- SendEmail: Protect users against vulnerable logmailers by @philwo in #939
- fix(demangle): prevent signed integer overflow by @sergiud in #955
- fix: address sanitizer failures by @sergiud in #956
- fix: stack buffer overflow by @sergiud in #957
- fix(demangle): limit recursion depth by @sergiud in #958
- fix(demangle): limit
ParseTemplateArg
recursion depth by @sergiud in #963 - fix: enable building without threads by @sergiud in #964
- ci: replace lcov by gcovr by @sergiud in #965
- Add tsan annotation to static variable when checking if vlog is on. by @pateldeev in #890
- ci: drop code scanning category by @sergiud in #968
- fix: remove stray spaces by @sergiud in #967
- fix: prefer includes in same directory by @sergiud in #969
- Support truncate log file for windows by @bqhuyy in #960
- build(deps): bump actions/checkout from 3 to 4 by @dependabot in #970
- fix(cmake): rework ucontext_t introspection by @sergiud in #954
- LogCleaner: Fix the scenario when FLAGS_log_dir has no '/' suffix by @lingbin in #972
- fix(build): raise minimum cmake version to 3.21 by @sergiud in #974
- fix: remove redundant POSIX function aliases by @sergiud in #990
- build(deps): bump github/codeql-action from 2 to 3 by @dependabot in #988
- build(deps): bump actions/upload-artifact from 3 to 4 by @dependabot in #987
- cmake: replace
check_library_exists
bycheck_cxx_symbol_exists
by @sergiud in #991 - fix: log last error code instead of a BOOL by @sergiud in #994
- fix: replace NULL by nullptr by @sergiud in #993
- fix: drop custom (v)snprintf definition by @sergiud in #992
- symbolize_unittest: make it a bit more portable by @vapier in #985
- Added missing debug-logging macros by @4c3y in #986
- fix: shell quote user-provided mailer path by @sergiud in #999
- cmake: use threads import target by @sergiud in #1000
- cmake: do not enable TLS without threads by @sergiud in #1001
- cmake: remove obsolete check by @sergiud in #1002
- cmake: simplify symbol availability checks by @sergiud in #1003
- cmake: use glog specific project variables by @sergiud in #1004
- cmake: remove pre C++11 warning options by @sergiud in #1005
- fix: enable strip log tests by @sergiud in #1009
- rework public header structure by @sergiud in #1012
- fix: add missing
gmtime_r
check by @sergiud in #1013 - fix: remove unused test code by @sergiud in #1014
- feat: use standard mutexes by @sergiud in #1015
- feat: reduce manual deallocations by @sergiud in #1016
- fix(tests): prevent clang from optimizing new away by @sergiud in #1017
- fix(demangle): support decltype(nullptr) and pack expansion by @sergiud in #1018
- feat: use standard threads by @sergiud in #1019
- cmake: remove unused check by @sergiud in #1021
- feat: use chrono by @sergiud in #1020
- fix(demangle): place symbols in anonymous namespace by @sergiud in #1022
- feat(demangle): use cxx abi demangler by @sergiud in #1023
- fix: make log severity type safe by @sergiud in #1025
- feat: use standard atomics and call_once by @sergiud in #1026
- fix: cleanup exports by @sergiud in #1029
- feat: make headers self-contained by @sergiud in #1030
- ci(codecov): enable comments by @sergiud in #966
- fix: ensure export macro to be defined by @sergiud in #1031
- fix: remove unused declaration by @sergiud in #1032
- feat: make IsFailureSignalHandlerInstalled public by @sergiud in #1033
- fix: allow setting
stderrthreshold
usingGLOG_stderrthreshold
by @sergiud in #1034 - fix(debug): add missing parentheses in ternary expression by @sergiud in #1035
- fix: threads are always enabled by @sergiud in #1036
- cmake: determine when to use port.h by @sergiud in #1037
- feat(cleanup): use chrono by @sergiud in #1038
- feat(logger): use chrono by @sergiud in #1039
- feat(time): use tm::tm_gmtoff if present by @sergiud in #1040
- docs: cleanup by @sergiud in #1041
- fix: do not export g_logging_fail_func by @sergiud in #1042
- fix: reduce boilerplate code by @sergiud in #1043
- docs: describe default prefix format by @sergiud in #1045
- fix: reduce manual resource management by @sergiud in #1046
- fix(symbolize): simplify resource management by @sergiud in #1047
- fix(symbolize): cleanup by @sergiud in #1048
- feat: provide fallback for accessing process name by @sergiud in #1049
- fix: unify additional debug output by @sergiud in #1050
- feat(dbghelp): show source line number if present by @sergiud in #1051
- cmake: bump SOVERSION by @sergiud in #1052
- fix: move LogMessageVoidify into internal namespace by @sergiud in #1053
- cmake: replace check_function_exists by check_cxx_symbol_exists by @sergiud in #1054
- fix: better encapsulate internals by @sergiud in #1055
- fix(symbolize): use correct format specifier by @sergiud in #1056
- fix: unify LogMessage and LogMessageInfo by @sergiud in #1057
- cmake: rework elf detection by @sergiud in #1058
- Add MODULE.bazel file by @Vertexwahn in #1059
- build(deps): bump actions/cache from 3 to 4 by @dependabot in #1064
- ci(coverage): update to gcovr 7.0 by @sergiud in #1070
- Update README.rst by @RISHIKREDDYL in #1072
- feat: support failure functions that throw by @sergiud in #1074
- feat: allow to obtain the stack trace as a string by @sergiud in #1075
New Contributors
- @xiaoxq made their first contribution in #831
- @joeyparrish made their first contribution in #835
- @lstaroth made their first contribution in #830
- @marekcirkos made their first contribution in #851
- @comius made their first contribution in #863
- @jsharpe made their first contribution in #877
- @catenacyber made their first contribution in #878
- @uilianries made their first contribution in #862
- @noaxp made their first contribution in #905
- @brad0 made their first contribution in #921
- @mai93 made their first contribution in #916
- @Vertexwahn made their first contribution in #919
- @ekilmer made their first contribution in #925
- @pravinba9495 made their first contribution in #946
- @pateldeev made their first contribution in #890
- @bqhuyy made their first contribution in #960
- @dependabot made their first contribution in #970
- @lingbin made their first contribution in #972
- @vapier made their first contribution in #985
- @4c3y made their first contribution in #986
- @RISHIKREDDYL made their first contribution in #1072
Full Changelog: v0.6.0...v0.7.0