Squashed 'third_party/google-glog/' changes from 5d46e1bcf..a1b6164ef
a1b6164ef windows: call to FormatMessage() should _IGNORE_INSERTS (#849)
278ed9689 simplify DLOG macro definition in NDEBUG mode (#830)
6ed0c9e58 added emscripten support (#846)
a34226ca9 support ndk r25 (#844)
c515e1ae2 remove unused STDC_HEADERS definition (#835)
79d692c64 Strip only the first leading @
086ce224d bazel: Use glog 0.6.0 in README.
b33e3bad4 Merge pull request #812 from google/release-0.6
54b8bcbbf release 0.6
864ef6492 Merge pull request #801 from skeptic-monkey/master
c640c2f7c Fix namespace resolution issue in LOG_EVERY_T
5addeedc0 Fix "'GLOG_EXPORT' macro redefined" on clang-cl
d153e294b Avoid "GLOG_EXPORT macro redefined" in clang-cl CI
c4ca519a8 Add CI job for clang-cl on Windows
a8e0007e9 Merge pull request #790 from git-hulk/feature/logs-to-stdout
553ddaea8 Merge pull request #794 from Arfrever/tests-TMPDIR
6d3f70a40 Pass EXIT_SUCCESS or EXIT_FAILURE to exit() and _exit()
612a7d28c Tests: Respect TEST_TMPDIR, TMPDIR, TMP environmental variables
180b700dd Add logtostdout and colorlogtostdout flags for logging to stdout
b38ed9d08 cmake_package_config_generate: Fix CMake warnings with CMake 3.23
9f0b7d3bf renamed GOOGLE_GLOG_DLL_DECL to GLOG_EXPORT
aa94e6b9a simplify flags export
17269d649 cmake: enable custom prefix by default
bc1fada1c libglog.pc: Set Libs.private for static linking
18836106d LogCleaner: avoid scanning logs too frequently
b0174b3dd On Solaris, uname() returns non-negative value
696941218 Changed my Email ID
643441014 cmake: require at least gflags 2.2.2
a8cfbe0c0 stdcxx: eliminate excessive use of std::string::c_str()
b3abfaa12 use uint32 for --max-log-size
43fc3bf91 Add log_year_in_prefix flag
42d509b1c revert to int atomics
224f66bb6 cmake: do not search for platform specific unwind
4ffa98388 ensure _Unwind_Backtrace to actually be available
087ad5bf3 eliminated clang warnings
9dc1107f8 run clang-tidy
dfb9ffc32 provide backward compatible send overload
c57511605 ci: removed deprecated msvc runner
d09b999f3 LogCleaner: make overdue_days_ unsigned int
baa7006e6 ci: enable warnings as errors
660352f02 cmake: require at least version 3.16 (fixes #705)
52354b2ad eliminate msvc warnings
ccbda2dfd LogCleaner: Fix relative paths and add a new test
ef36f800e 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
ee6faf13b ci: use codecov token
6e9b2f16f cmake: set CMP0074 policy
f4dd77ae6 ci: reworked windows builds
503e3dec8 Add Zhuoran Shen to AUTHORS and CONTRIBUTORS
531659984 Fix log filename format
cd8fbd5fb ci: prefix artifact directories
c8a7f5abe ci: added checkout action
f47582361 ci: install lcov
f773eb9b6 ci: unzip artifacts into separate directories
f42fd3b15 ci: fixed unzipping multiple archives
cb7c19d36 ci: removed non standard --zero option
cf4c4699b ci: unzip artifacts individually
5a3bd74cf ci: replaced forEach by a loop
1da31df93 ci: name unpack step and fix indent
6bd5acfb6 ci: download workflow artifacts
8121c0755 ci: aggregate coverage in separate workflow
8b872216e ci: simplify coveralls job id
11f08e7bb Merge pull request #742 from google/protect-vlog
65199ed0b protect VLOG by use_logging
b79e18b78 ci: updated coveralls job id
4399e5664 ci: explicitly identify coveralls builds
9206460cd Merge pull request #739 from google/cmake-glog-modules-install
64b4e327f cmake: fixed glog-modules.cmake installation
4df5ae746 ci: added cmake package config test
ab5e10929 Revert "cmake: fix incorrect relative path concatenation (#733)"
32522a5f6 ci: notify coveralls on finished parallel builds
d581807e3 ci: run coveralls on completed workflow
6c9f5b2ec ci: added jobs to coveralls workflow
0798a37bb ci: added coveralls workflow
33696664c restore the stream format after writing the log prefix (#731)
68964b8db cmake: fix incorrect relative path concatenation (#733)
17e7679fd Merge pull request #654 from aesophor/fix-path
c27c3a803 make LogCleaner support relative paths
e8e40f76d Merge pull request #732 from google/log-cleaner-tests
3362cc6c7 added log cleaner tests and fixed paths
9cf0eb7c9 Merge pull request #724 from google/mock-log
1398762db added mock log test
ce3533613 Merge pull request #723 from google/coverage-use-templates
06e665108 ci: replace generated headers by templates
56d3facee Merge pull request #722 from google/linux-github-action
4a55b1158 ci: added linux github workflow
396558472 support stack unwind on Android
acda90348 Merge pull request #720 from google/gmock-support
8474b7854 added gmock support
831a6f823 Add -Werror to Bazel presubmits
c34dbe987 Fix `syscall` warning in Bazel Build
56523194b Merge pull request #716 from google/export-os-defines
f7407d4d2 export OS_* defines (fixes #715)
2412db315 `raw_logging.h` depends on type definition in `logging.h`. Resolve https://github.com/google/glog/issues/712
3b6b05d70 Use __EMSCRIPTEN__ instead of __USE_POSIX2
de81bb0aa Fix link error for Emscripten
9733727be Merge pull request #706 from dfreese/tsan_annotation
ffb40018a Change size type in AnnotateBenignRaceSized to size_t from long
6f9e32a79 Merge pull request #700 from Starsss/master
df95749e8 Fix: not implement virtual class when WITH_CUSTOM_PREFIX on
35983c895 Merge pull request #696 from Fettpet/signed_compare
9fce37c46 Add a static cast to compare unsigned with unsigned
a063a04ec Merge pull request #694 from google/more-warnings
92cb3c449 fixed additional warnings
f8c8e99fd Merge pull request #688 from google/eliminate-warnings
98e0e8c65 cmake: bump .so version
0b83bb203 eliminate warnings
370cb741b Merge pull request #674 from StephLin/readme-fix-header-id
3ce6090d0 override header language
36bcd28c6 Merge pull request #687 from google/exception-spec
dfe573088 bump version
717f56983 fixed exception specification mismatch
eca3ddef8 Merge pull request #685 from z-aki/master
4a4331f2f Fix syscall deprecation warning on macOS >= 10.12
a01d739ea Merge pull request #684 from sergiud/cmake-namespaced-gflags
8d3ce1c29 Merge pull request #686 from google/ci-more-targets
c39fcf6e8 ci: added more targets
47ad26d5c readme: fixed inconsistent formatting
5bf7fdea1 cmake: prefer linking against gflags::gflags (fixes #683)
42ce901f2 Merge pull request #669 from darbitman/log-every-time-period
a1374c420 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.
6e46c125e bazel: add GLOG_CUSTOM_PREFIX_SUPPORT
a41555685 Remove ubuntu1604 from presubmit.yml
a1fa841f3 readme: fix wrong header id
a4a725d54 Merge pull request #671 from sergiud/cmake-define-have-cxx11-atomic
44331dc24 Merge pull request #672 from sergiud/cmake-allow-to-override-fpic
f0bac8852 cmake: allow to override `-fPIC`
764162569 Merge pull request #670 from sergiud/cmake-msvc-snprintf
d25a1b7bc cmake: export `<atomic>` availability (fixes #667)
9c1a25b93 cmake: fixed msvc snprintf detection (fixes #668)
c1499f64a Export COPYING
03f2b3861 Merge pull request #650 from romange/Prod
86fea1ab2 Allow updating vmodule levels after vmodule was parsed, invalidate already cached site flags vmodule flag is relevant for GNUC environments only.
fef48c17e Merge pull request #656 from romange/cygwin
d2fed749a Fix cmake configuration for cygwin environment
0b3d4cb47 Merge pull request #651 from xkszltl/initapi
81e0d616e 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.
d5c04eec9 bazel: Use glog 0.5.0 in README
8f9ccfe77 Merge pull request #646 from sergiud/release-0.5
36fee386f release 0.5
8d40d7564 Merge pull request #642 from husskade/patch-1
a23e96f04 readme: update CMake source directory option
0efaa59a7 Merge pull request #641 from sergiud/nullptr
230da316c Merge pull request #637 from xiaobfly/master
bda40ec00 Merge pull request #640 from sergiud/gflags-windows-linker-warnings
762a2a7ee eliminated gflags related linker warnings (#569)
7d4eeb14f Merge pull request #554 from santigl/santigl/custom-prefixer
0cbc23529 Add support for setting a custom prefix format
c7656c3ec CHECK support for nullptr (fixes #341)
663bb2696 Merge pull request #620 from sergiud/cmake-allow-to-disable-symbolize
7ec73b509 Merge pull request #639 from sergiud/fix-windows-builds
efc341d76 fixed windows builds
a79416bab Merge pull request #638 from NeroBurner/github_actions
63ec71b58 Add windows builds with GitHub Actions
39e83581d cmake: allow to disable symbolize
635a07818 fix LogCleaner::IsLogFromCurrentProject for filename_extension
e51790bf3 Merge pull request #625 from sergiud/remove-windows-headers
36e6ed910 Merge pull request #635 from google/win-headers
7d60d6e04 removed windows specific headers
1041a221b Use generated config.h for Windows.
82320a8a8 Merge pull request #631 from xiaobfly/master
bf183f44f Merge pull request #632 from sergiud/cmake-default-shared-libs
9ee010d85 cmake: build shared libs by default
4fca1b967 fixed filename extension
30bb9086d bazel: use expand_template instead of genrules
d66e59318 Merge pull request #618 from sergiud/ac_cv___attribute___printf_4_5
d5fdcfefc Merge pull request #623 from sergiud/language-version
7f8a48b3b Merge pull request #595 from r-barnes/richard/ctr_type_fix
5abed00e3 Merge pull request #626 from sergiud/use-c++-headers
bf3e5a80a Change counter type to uint64
01f3e543e use C++ headers
2f7d608a9 Merge pull request #627 from sergiud/cmake-no-c-compiler
3f4df6aee cmake: do not require a C compiler
7a6e743eb Merge pull request #624 from sergiud/qualify-std-string
e27f14119 Merge pull request #622 from sergiud/max_log_size-overflow
0b3c27d04 fully qualify std::string
5c57edfbc readme: document C++ version
20984f973 Merge pull request #621 from sergiud/cmake-use-gtest
3533c22d2 handle --max_log_size overflow
be25d94c2 cmake: optionally use gtest
45fdc922d Merge pull request #619 from sergiud/cmake-proper-symbol-export
c30896d3d cmake: export symbols selectively
b442ef807 build: set ac_cv___attribute___printf_4_5
d4e8ebab7 Add layering_check to Bazel CI.
0863ad797 bazel: declare headers in top-level rule
ce50c57b9 Rename BUILD to BUILD.bazel.
d824eae3c Merge pull request #613 from sergiud/cmake-unwind-patch-match
df3ce126d cmake: fixed unwind patch component match check
246e49ac4 Merge pull request #610 from sergiud/readme-cleanup
9881ea596 Fix race conditions in LOG_EVERY_N (#492)
4cef72332 Merge pull request #611 from sergiud/incorrect-cygwin64-define
544b4a4f5 Merge pull request #609 from sergiud/cmake-unwind-empty-patch-component
b9be6bb5d consolidate readme
6d14ac3ef Fix the symlink creation bug if using bazel
795384957 replaced __CYGWIN32__ and __CYGWIN64__ by __CYGWIN__
e370cd516 bump version
3b21da69e cmake: handle empty unwind version patch component
4fa737b62 Merge pull request #400 from guoyuhong/fixWebmailer
4f09bed0b Merge pull request #263 from kennyyu/tsan_benign_race
7bba6030c Merge pull request #592 from aesophor/fix-logcleaner-file-ext
7a8b66aa1 Merge pull request #593 from aesophor/fix-typo
6d5da2154 Merge pull request #608 from mahiuchun/stl
15d51a17c Make stl_logging_unittest more robust.
fe1287dd5 src/logging.cc: Fix a typo in comment
431d74c80 src/logging.cc: Make LogCleaner aware of filename extension (#589)
c8f8135a5 Merge pull request #502 from aesophor/encapsulate-log-cleaner
d82641f70 Merge branch 'master' into encapsulate-log-cleaner
cec37e1cf Merge pull request #542 from xulongwu4/master
b55437ac1 Fix logmailer problem for dynamic lib.
c5dcae830 Merge pull request #467 from sukill/master
b30a009fa Merge pull request #585 from sergiud/remove-drop-autoconf-support
b539557b3 removed autoconf support
d516278b1 Merge pull request #540 from pwnall/fix-uv-warn
6c0a5fcb5 Fix unused parameter warning on gcc.
f28ae960c Merge pull request #573 from msamoila/msamoila-use-utc-time
fa0d50f9f Merge pull request #570 from jiuqiant/patch-1
fcc9da24a Merge pull request #545 from julianaito/master
40ab82281 Merge pull request #438 from d-uspenskiy/master
4c5a60c3c Merge pull request #551 from aesophor/replace-sprintf
8ee2bb5b3 Merge pull request #553 from huangqinjin/android
024b095d7 Merge pull request #552 from huangqinjin/master
d44246069 Merge pull request #579 from arj-fb/safety_check_at_SymbolizeAndDemangle
5bc1e1177 Merge pull request #580 from Yicong-Huang/patch-1
af4df08e5 Merge pull request #576 from santigl/santigl/streambuf-overflow-override
725818984 Add `override` to `LogStreamBuf::overflow()`
c652590d8 Update CMakeLists.txt
e5ef2728b Added check for if info.dli_sname is NULL
909069ea8 Add FLAGS_log_utc_time; when 'true' the time will be written in log in UTC
64650ef2e Connect glog to Andorid logging API
0a2e5931b Fix build for Emscripten (#546)
0a12a96ce Output to logcat on Android
d8998fe4f Make message text null-terminated
2e87f98fe Replace sprintf() with snprintf() (#536)
7001ab9ec OpenBSD/powerpc: clang does not define _CALL_* use proper ifdef
4a82a856d Use NULL to indicate uninitialized VLOG_IS_ON site.
3ba897659 fix bazel build for freebsd
ceb716388 Add extra information in log file header (application build/version, actual duration time)
28321d895 Merge pull request #503 from alexsmac/fix-custom-logger-deletion
5b4fb63d2 Prepend the year to each glog line (#516) (#530)
7da49d48a Merge pull request #515 from segfaulthunter/doc
940335d82 Add vcpkg installation instructions (#517)
dfc0e441c Merge pull request #523 from edbaunton/cmake-have-symbolize
eb13e4f67 Allow CMake user to disable Symbolize functionality
195d416e3 Add target existence checks to Unwind find module (#518)
74076bebc Explain log levels.
130a3e10d Use file offsets in traces if object has no symbols (#513)
445af7ef7 Merge pull request #508 from xiaosuo/close
a35e612c5 Don't call close(2) more than once
36fa99ba2 src/logging.cc: check the entire filename format
0a6704b43 Fix missing deletion of custom Logger
7764e4a8b src/logging.cc: match logfile with base_filename
3b5f2807f src/logging.cc: encapsulate log cleaner
1b7d54143 Add note about `namespace` on Win32.
95a365579 Remove unnecessary `defines`
c0d2ceade Avoid leaking config.h
925858d99 add windows target to bazel CI
20919b325 add windows support for bazel bazed build
7f732529d apply buildifier on glog.bzl
1863b4228 Merge pull request #368 from UVV-gh/cmake-sdk-fix
c0463b17b added cmake package config unit test
9a43cfb8d install unwind find module alongside glog
19570c69c renamed and cleaned up the unwind find module
58d7f873d Added fixed log name support, take 2 (#489)
0bf00f95a Merge pull request #491 from aesophor/update-doc
0f4975a68 doc: add information about log cleaner
5ef521d4a Merge pull request #487 from Telunsu/fix_wrong_assignment
e58e596f1 src/logging.cc: fix wrong assignment
f811ae9ed Merge pull request #485 from ffontaine/master
3ee89c86d src/symbolize.cc: do not check for HAVE_DLFCN_H for macOS
4d6aff418 Merge pull request #477 from ffontaine/master
742fe94f2 Use libunwind as an imported target
9630e0e84 src/utilities: fix build without pthread
fd3dc2c63 Merge pull request #484 from sergiud/remove-executable-flag
eec1435d5 removed executable flag from .cmake file
e227697b0 Merge pull request #483 from loop0day/enhance
82d0860b7 Support pkg-config
e0a2521e3 Merge pull request #482 from google/revert-19-master
a6f7be14c Add support for automatic removal of old logs (#432)
15fb5ca5b Revert "Added fixed log name support"
5792d60d6 Merge pull request #441 from asekretenko/useconds
44f6079fa Merge pull request #19 from ezegomez/master
242130d30 Merge pull request #350 from TheModMaker/fixIosSim
1a4c47a74 Merge pull request #88 from kekstee/master
f17d11aa8 Merge pull request #161 from mpercy/thread-local-libunwind-2
1227cf4da Merge pull request #312 from ruslo/pr.api21
0f83e53c4 Merge pull request #443 from ammubhave/fix_musl_build
e558d50b0 Merge pull request #370 from hemantbits/patch-1
30f7f3ee9 Merge pull request #479 from neheb/patch-2
6f5699a23 Merge pull request #460 from neheb/patch-1
e24276a35 logging: Fix compilation with uClibc++
1d762fa5b googletest: Switch to nanosleep
1655f4f91 Merge pull request #475 from ffontaine/master
10498b485 src/symbolize.cc: fix build without dlfcn.h
1e6b9f329 declare FLAGS_vmodule
4cc89c9e2 Merge pull request #465 from durswd/support_clang-cl
a8fad525e Changed the order of conditions
00cb9f4e6 I supported clang-cl with BUILD_SHARED_LIBS
ba8a9f695 fix typo: TOOD -> TODO (#448)
0d0c25431 Don't test on Ubuntu 14.04 (#446)
6ca3d3cf5 Fix stacktrace on bazel build. (#347)
834dd780b Fix symbolize_unittest for musl builds
94a54120d Extended the LogSink interface to be able to pass microseconds.
96a2f23dc Merge pull request #419 from shinh/release-0-4-0
5c576f78c Merge pull request #431 from romkatv/disallow_prefix
29dd5da60 Add Roman Perepelitsa to AUTHORS and CONTRIBUTORS
4db063134 Protect macros from user code to the left of them
460ec1f56 Merge branch 'master' into release-0-4-0
41f4bf9cb Merge pull request #425 from plmuon/remove-time-from-raw-logging
64041397b Use `static` to define CheckStackTrace on non-GNU (#429)
7f91846ca Stop using auto_ptr (#428)
e5588de96 remove time from raw logging
7ffca211f fix appveyor link (#424)
ed1ef7c4d Apply #397 to glog/logging.h.in
1431a17f3 Merge pull request #420 from kwaegel/patch-1
1d98d00c7 Update ChangeLog to record release dates at least
342fa2674 Use push/pop macro when supressing warning
406b0e702 glog: release 0.4.0
6d6d31872 Run src/windows/preprocess.sh
41a6a7880 Fix warnings
a606c3187 Allow getpwuid_r to return missing entry.
d064ab8d0 Fix build for Android API < 21
4764ca65f Annotate LOG_EVERY_N macros as a benign race for TSAN
f581614a7 Use thread local for libunwind GetStackTrace()
47af307fa Added fixed log name support
d68736bc1 Respect configured docdir
git-subtree-dir: third_party/google-glog
git-subtree-split: a1b6164ef15cf4be3b1914f2df7125fc7ffc7ca8
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Change-Id: I2286351db32cb46aa8743a28e191dfc9c62783da
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..d2c69a6
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,879 @@
+Google Logging Library
+======================
+
+|Linux Github actions| |Windows Github actions| |macOS Github actions| |Total alerts| |Language grade: C++| |Codecov|
+
+Google Logging (glog) is a C++98 library that implements application-level
+logging. The library provides logging APIs based on C++-style streams and
+various helper macros.
+
+.. role:: cmake(code)
+ :language: cmake
+
+.. role:: cmd(code)
+ :language: bash
+
+.. role:: cpp(code)
+ :language: cpp
+
+.. role:: bazel(code)
+ :language: starlark
+
+
+Getting Started
+---------------
+
+You can log a message by simply streaming things to ``LOG``\ (<a
+particular `severity level <#severity-levels>`__>), e.g.,
+
+.. code:: cpp
+
+ #include <glog/logging.h>
+
+ int main(int argc, char* argv[]) {
+ // Initialize Google’s logging library.
+ google::InitGoogleLogging(argv[0]);
+
+ // ...
+ LOG(INFO) << "Found " << num_cookies << " cookies";
+ }
+
+
+For a detailed overview of glog features and their usage, please refer
+to the `user guide <#user-guide>`__.
+
+.. contents:: Table of Contents
+
+
+Building from Source
+--------------------
+
+glog supports multiple build systems for compiling the project from
+source: `Bazel <#bazel>`__, `CMake <#cmake>`__, and `vcpkg <#vcpkg>`__.
+
+Bazel
+~~~~~
+
+To use glog within a project which uses the
+`Bazel <https://bazel.build/>`__ build tool, add the following lines to
+your ``WORKSPACE`` file:
+
+.. code:: bazel
+
+ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+ http_archive(
+ name = "com_github_gflags_gflags",
+ sha256 = "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf",
+ strip_prefix = "gflags-2.2.2",
+ urls = ["https://github.com/gflags/gflags/archive/v2.2.2.tar.gz"],
+ )
+
+ http_archive(
+ name = "com_github_google_glog",
+ sha256 = "122fb6b712808ef43fbf80f75c52a21c9760683dae470154f02bddfc61135022",
+ strip_prefix = "glog-0.6.0",
+ urls = ["https://github.com/google/glog/archive/v0.6.0.zip"],
+ )
+
+You can then add :bazel:`@com_github_google_glog//:glog` to the deps section
+of a :bazel:`cc_binary` or :bazel:`cc_library` rule, and :code:`#include
+<glog/logging.h>` to include it in your source code. Here’s a simple example:
+
+.. code:: bazel
+
+ cc_binary(
+ name = "main",
+ srcs = ["main.cc"],
+ deps = ["@com_github_google_glog//:glog"],
+ )
+
+CMake
+~~~~~
+
+glog also supports CMake that can be used to build the project on a wide
+range of platforms. If you don’t have CMake installed already, you can
+download it for from CMake’s `official
+website <http://www.cmake.org>`__.
+
+CMake works by generating native makefiles or build projects that can be
+used in the compiler environment of your choice. You can either build
+glog with CMake as a standalone project or it can be incorporated into
+an existing CMake build for another project.
+
+Building glog with CMake
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+When building glog as a standalone project, on Unix-like systems with
+GNU Make as build tool, the typical workflow is:
+
+1. Get the source code and change to it. e.g., cloning with git:
+
+ .. code:: bash
+
+ git clone https://github.com/google/glog.git
+ cd glog
+
+2. Run CMake to configure the build tree.
+
+ .. code:: bash
+
+ cmake -S . -B build -G "Unix Makefiles"
+
+ CMake provides different generators, and by default will pick the most
+ relevant one to your environment. If you need a specific version of Visual
+ Studio, use :cmd:`cmake . -G <generator-name>`, and see :cmd:`cmake --help`
+ for the available generators. Also see :cmd:`-T <toolset-name>`, which can
+ be used to request the native x64 toolchain with :cmd:`-T host=x64`.
+
+3. Afterwards, generated files can be used to compile the project.
+
+ .. code:: bash
+
+ cmake --build build
+
+4. Test the build software (optional).
+
+ .. code:: bash
+
+ cmake --build build --target test
+
+5. Install the built files (optional).
+
+ .. code:: bash
+
+ cmake --build build --target install
+
+Consuming glog in a CMake Project
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If you have glog installed in your system, you can use the CMake command
+:cmake:`find_package` to build against glog in your CMake Project as follows:
+
+.. code:: cmake
+
+ cmake_minimum_required (VERSION 3.16)
+ project (myproj VERSION 1.0)
+
+ find_package (glog 0.6.0 REQUIRED)
+
+ add_executable (myapp main.cpp)
+ target_link_libraries (myapp glog::glog)
+
+Compile definitions and options will be added automatically to your
+target as needed.
+
+Incorporating glog into a CMake Project
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You can also use the CMake command :cmake:`add_subdirectory` to include glog
+directly from a subdirectory of your project by replacing the
+:cmake:`find_package` call from the previous example by
+:cmake:`add_subdirectory`. The :cmake:`glog::glog` target is in this case an
+:cmake:`ALIAS` library target for the ``glog`` library target.
+
+Again, compile definitions and options will be added automatically to
+your target as needed.
+
+vcpkg
+~~~~~
+
+You can download and install glog using the `vcpkg
+<https://github.com/Microsoft/vcpkg>`__ dependency manager:
+
+.. code:: bash
+
+ git clone https://github.com/Microsoft/vcpkg.git
+ cd vcpkg
+ ./bootstrap-vcpkg.sh
+ ./vcpkg integrate install
+ ./vcpkg install glog
+
+The glog port in vcpkg is kept up to date by Microsoft team members and
+community contributors. If the version is out of date, please create an
+issue or pull request on the vcpkg repository.
+
+User Guide
+----------
+
+glog defines a series of macros that simplify many common logging tasks.
+You can log messages by severity level, control logging behavior from
+the command line, log based on conditionals, abort the program when
+expected conditions are not met, introduce your own verbose logging
+levels, customize the prefix attached to log messages, and more.
+
+Following sections describe the functionality supported by glog. Please note
+this description may not be complete but limited to the most useful ones. If you
+want to find less common features, please check header files under `src/glog
+<src/glog>`__ directory.
+
+Severity Levels
+~~~~~~~~~~~~~~~
+
+You can specify one of the following severity levels (in increasing
+order of severity): ``INFO``, ``WARNING``, ``ERROR``, and ``FATAL``.
+Logging a ``FATAL`` message terminates the program (after the message is
+logged). Note that messages of a given severity are logged not only in
+the logfile for that severity, but also in all logfiles of lower
+severity. E.g., a message of severity ``FATAL`` will be logged to the
+logfiles of severity ``FATAL``, ``ERROR``, ``WARNING``, and ``INFO``.
+
+The ``DFATAL`` severity logs a ``FATAL`` error in debug mode (i.e.,
+there is no ``NDEBUG`` macro defined), but avoids halting the program in
+production by automatically reducing the severity to ``ERROR``.
+
+Unless otherwise specified, glog writes to the filename
+``/tmp/\<program name\>.\<hostname\>.\<user name\>.log.\<severity level\>.\<date\>-\<time\>.\<pid\>``
+(e.g.,
+``/tmp/hello_world.example.com.hamaji.log.INFO.20080709-222411.10474``).
+By default, glog copies the log messages of severity level ``ERROR`` or
+``FATAL`` to standard error (``stderr``) in addition to log files.
+
+Setting Flags
+~~~~~~~~~~~~~
+
+Several flags influence glog’s output behavior. If the `Google gflags library
+<https://github.com/gflags/gflags>`__ is installed on your machine, the build
+system will automatically detect and use it, allowing you to pass flags on the
+command line. For example, if you want to turn the flag :cmd:`--logtostderr` on,
+you can start your application with the following command line:
+
+.. code:: bash
+
+ ./your_application --logtostderr=1
+
+If the Google gflags library isn’t installed, you set flags via
+environment variables, prefixing the flag name with ``GLOG_``, e.g.,
+
+.. code:: bash
+
+ GLOG_logtostderr=1 ./your_application
+
+The following flags are most commonly used:
+
+``logtostderr`` (``bool``, default=\ ``false``)
+ Log messages to ``stderr`` instead of logfiles. Note: you can set
+ binary flags to ``true`` by specifying ``1``, ``true``, or ``yes``
+ (case insensitive). Also, you can set binary flags to ``false`` by
+ specifying ``0``, ``false``, or ``no`` (again, case insensitive).
+
+``stderrthreshold`` (``int``, default=2, which is ``ERROR``)
+ Copy log messages at or above this level to stderr in addition to
+ logfiles. The numbers of severity levels ``INFO``, ``WARNING``,
+ ``ERROR``, and ``FATAL`` are 0, 1, 2, and 3, respectively.
+
+``minloglevel`` (``int``, default=0, which is ``INFO``)
+ Log messages at or above this level. Again, the numbers of severity
+ levels ``INFO``, ``WARNING``, ``ERROR``, and ``FATAL`` are 0, 1, 2,
+ and 3, respectively.
+
+``log_dir`` (``string``, default="")
+ If specified, logfiles are written into this directory instead of the
+ default logging directory.
+
+``v`` (``int``, default=0)
+ Show all ``VLOG(m)`` messages for ``m`` less or equal the value of
+ this flag. Overridable by :cmd:`--vmodule`. See `the section about
+ verbose logging <#verbose-logging>`__ for more detail.
+
+``vmodule`` (``string``, default="")
+ Per-module verbose level. The argument has to contain a
+ comma-separated list of <module name>=<log level>. <module name> is a
+ glob pattern (e.g., ``gfs*`` for all modules whose name starts with
+ "gfs"), matched against the filename base (that is, name ignoring
+ .cc/.h./-inl.h). <log level> overrides any value given by :cmd:`--v`.
+ See also `the section about verbose logging <#verbose-logging>`__.
+
+There are some other flags defined in logging.cc. Please grep the source
+code for ``DEFINE_`` to see a complete list of all flags.
+
+You can also modify flag values in your program by modifying global
+variables ``FLAGS_*`` . Most settings start working immediately after
+you update ``FLAGS_*`` . The exceptions are the flags related to
+destination files. For example, you might want to set ``FLAGS_log_dir``
+before calling :cpp:`google::InitGoogleLogging` . Here is an example:
+
+.. code:: cpp
+
+ LOG(INFO) << "file";
+ // Most flags work immediately after updating values.
+ FLAGS_logtostderr = 1;
+ LOG(INFO) << "stderr";
+ FLAGS_logtostderr = 0;
+ // This won’t change the log destination. If you want to set this
+ // value, you should do this before google::InitGoogleLogging .
+ FLAGS_log_dir = "/some/log/directory";
+ LOG(INFO) << "the same file";
+
+Conditional / Occasional Logging
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Sometimes, you may only want to log a message under certain conditions.
+You can use the following macros to perform conditional logging:
+
+.. code:: cpp
+
+ LOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
+
+The "Got lots of cookies" message is logged only when the variable
+``num_cookies`` exceeds 10. If a line of code is executed many times, it
+may be useful to only log a message at certain intervals. This kind of
+logging is most useful for informational messages.
+
+.. code:: cpp
+
+ LOG_EVERY_N(INFO, 10) << "Got the " << google::COUNTER << "th cookie";
+
+The above line outputs a log messages on the 1st, 11th, 21st, ... times
+it is executed. Note that the special ``google::COUNTER`` value is used
+to identify which repetition is happening.
+
+You can combine conditional and occasional logging with the following
+macro.
+
+.. code:: cpp
+
+ LOG_IF_EVERY_N(INFO, (size > 1024), 10) << "Got the " << google::COUNTER
+ << "th big cookie";
+
+Instead of outputting a message every nth time, you can also limit the
+output to the first n occurrences:
+
+.. code:: cpp
+
+ LOG_FIRST_N(INFO, 20) << "Got the " << google::COUNTER << "th cookie";
+
+Outputs log messages for the first 20 times it is executed. Again, the
+``google::COUNTER`` identifier indicates which repetition is happening.
+
+Other times, it is desired to only log a message periodically based on a time.
+So for example, to log a message every 10ms:
+
+.. code:: cpp
+
+ LOG_EVERY_T(INFO, 0.01) << "Got a cookie";
+
+Or every 2.35s:
+
+.. code:: cpp
+
+ LOG_EVERY_T(INFO, 2.35) << "Got a cookie";
+
+Debug Mode Support
+~~~~~~~~~~~~~~~~~~
+
+Special "debug mode" logging macros only have an effect in debug mode
+and are compiled away to nothing for non-debug mode compiles. Use these
+macros to avoid slowing down your production application due to
+excessive logging.
+
+.. code:: cpp
+
+ DLOG(INFO) << "Found cookies";
+ DLOG_IF(INFO, num_cookies > 10) << "Got lots of cookies";
+ DLOG_EVERY_N(INFO, 10) << "Got the " << google::COUNTER << "th cookie";
+
+
+``CHECK`` Macros
+~~~~~~~~~~~~~~~~
+
+It is a good practice to check expected conditions in your program
+frequently to detect errors as early as possible. The ``CHECK`` macro
+provides the ability to abort the application when a condition is not
+met, similar to the ``assert`` macro defined in the standard C library.
+
+``CHECK`` aborts the application if a condition is not true. Unlike
+``assert``, it is \*not\* controlled by ``NDEBUG``, so the check will be
+executed regardless of compilation mode. Therefore, ``fp->Write(x)`` in
+the following example is always executed:
+
+.. code:: cpp
+
+ CHECK(fp->Write(x) == 4) << "Write failed!";
+
+There are various helper macros for equality/inequality checks -
+``CHECK_EQ``, ``CHECK_NE``, ``CHECK_LE``, ``CHECK_LT``, ``CHECK_GE``,
+and ``CHECK_GT``. They compare two values, and log a ``FATAL`` message
+including the two values when the result is not as expected. The values
+must have :cpp:`operator<<(ostream, ...)` defined.
+
+You may append to the error message like so:
+
+.. code:: cpp
+
+ CHECK_NE(1, 2) << ": The world must be ending!";
+
+We are very careful to ensure that each argument is evaluated exactly
+once, and that anything which is legal to pass as a function argument is
+legal here. In particular, the arguments may be temporary expressions
+which will end up being destroyed at the end of the apparent statement,
+for example:
+
+.. code:: cpp
+
+ CHECK_EQ(string("abc")[1], ’b’);
+
+The compiler reports an error if one of the arguments is a pointer and the other
+is :cpp:`NULL`. To work around this, simply :cpp:`static_cast` :cpp:`NULL` to
+the type of the desired pointer.
+
+.. code:: cpp
+
+ CHECK_EQ(some_ptr, static_cast<SomeType*>(NULL));
+
+Better yet, use the ``CHECK_NOTNULL`` macro:
+
+.. code:: cpp
+
+ CHECK_NOTNULL(some_ptr);
+ some_ptr->DoSomething();
+
+Since this macro returns the given pointer, this is very useful in
+constructor initializer lists.
+
+.. code:: cpp
+
+ struct S {
+ S(Something* ptr) : ptr_(CHECK_NOTNULL(ptr)) {}
+ Something* ptr_;
+ };
+
+Note that you cannot use this macro as a C++ stream due to this feature.
+Please use ``CHECK_EQ`` described above to log a custom message before
+aborting the application.
+
+If you are comparing C strings (:cpp:`char *`), a handy set of macros performs
+case sensitive as well as case insensitive comparisons - ``CHECK_STREQ``,
+``CHECK_STRNE``, ``CHECK_STRCASEEQ``, and ``CHECK_STRCASENE``. The CASE versions
+are case-insensitive. You can safely pass :cpp:`NULL` pointers for this macro. They
+treat :cpp:`NULL` and any non-:cpp:`NULL` string as not equal. Two :cpp:`NULL`\
+s are equal.
+
+Note that both arguments may be temporary strings which are destructed
+at the end of the current "full expression" (e.g.,
+:cpp:`CHECK_STREQ(Foo().c_str(), Bar().c_str())` where ``Foo`` and ``Bar``
+return C++’s :cpp:`std::string`).
+
+The ``CHECK_DOUBLE_EQ`` macro checks the equality of two floating point
+values, accepting a small error margin. ``CHECK_NEAR`` accepts a third
+floating point argument, which specifies the acceptable error margin.
+
+Verbose Logging
+~~~~~~~~~~~~~~~
+
+When you are chasing difficult bugs, thorough log messages are very useful.
+However, you may want to ignore too verbose messages in usual development. For
+such verbose logging, glog provides the ``VLOG`` macro, which allows you to
+define your own numeric logging levels. The :cmd:`--v` command line option
+controls which verbose messages are logged:
+
+.. code:: cpp
+
+ VLOG(1) << "I’m printed when you run the program with --v=1 or higher";
+ VLOG(2) << "I’m printed when you run the program with --v=2 or higher";
+
+With ``VLOG``, the lower the verbose level, the more likely messages are to be
+logged. For example, if :cmd:`--v==1`, ``VLOG(1)`` will log, but ``VLOG(2)``
+will not log. This is opposite of the severity level, where ``INFO`` is 0, and
+``ERROR`` is 2. :cmd:`--minloglevel` of 1 will log ``WARNING`` and above. Though
+you can specify any integers for both ``VLOG`` macro and :cmd:`--v` flag, the
+common values for them are small positive integers. For example, if you write
+``VLOG(0)``, you should specify :cmd:`--v=-1` or lower to silence it. This is
+less useful since we may not want verbose logs by default in most cases. The
+``VLOG`` macros always log at the ``INFO`` log level (when they log at all).
+
+Verbose logging can be controlled from the command line on a per-module
+basis:
+
+.. code:: bash
+
+ --vmodule=mapreduce=2,file=1,gfs*=3 --v=0
+
+will:
+
+(a) Print ``VLOG(2)`` and lower messages from mapreduce.{h,cc}
+(b) Print ``VLOG(1)`` and lower messages from file.{h,cc}
+(c) Print ``VLOG(3)`` and lower messages from files prefixed with "gfs"
+(d) Print ``VLOG(0)`` and lower messages from elsewhere
+
+The wildcarding functionality shown by (c) supports both ’*’ (matches 0
+or more characters) and ’?’ (matches any single character) wildcards.
+Please also check the section about `command line flags <#setting-flags>`__.
+
+There’s also ``VLOG_IS_ON(n)`` "verbose level" condition macro. This
+macro returns true when the :cmd:`--v` is equal or greater than ``n``. To
+be used as
+
+.. code:: cpp
+
+ if (VLOG_IS_ON(2)) {
+ // do some logging preparation and logging
+ // that can’t be accomplished with just VLOG(2) << ...;
+ }
+
+Verbose level condition macros ``VLOG_IF``, ``VLOG_EVERY_N`` and
+``VLOG_IF_EVERY_N`` behave analogous to ``LOG_IF``, ``LOG_EVERY_N``,
+``LOF_IF_EVERY``, but accept a numeric verbosity level as opposed to a
+severity level.
+
+.. code:: cpp
+
+ VLOG_IF(1, (size > 1024))
+ << "I’m printed when size is more than 1024 and when you run the "
+ "program with --v=1 or more";
+ VLOG_EVERY_N(1, 10)
+ << "I’m printed every 10th occurrence, and when you run the program "
+ "with --v=1 or more. Present occurence is " << google::COUNTER;
+ VLOG_IF_EVERY_N(1, (size > 1024), 10)
+ << "I’m printed on every 10th occurence of case when size is more "
+ " than 1024, when you run the program with --v=1 or more. ";
+ "Present occurence is " << google::COUNTER;
+
+
+Custom Log Prefix Format
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+glog supports changing the format of the prefix attached to log messages by
+receiving a user-provided callback to be used to generate such strings. That
+feature must be enabled at compile time by the ``WITH_CUSTOM_PREFIX`` flag.
+
+For each log entry, the callback will be invoked with a ``LogMessageInfo``
+struct containing the severity, filename, line number, thread ID, and time of
+the event. It will also be given a reference to the output stream, whose
+contents will be prepended to the actual message in the final log line.
+
+For example:
+
+.. code:: cpp
+
+ /* This function writes a prefix that matches glog's default format.
+ * (The third parameter can be used to receive user-supplied data, and is
+ * NULL by default.)
+ */
+ void CustomPrefix(std::ostream &s, const LogMessageInfo &l, void*) {
+ s << l.severity[0]
+ << setw(4) << 1900 + l.time.year()
+ << setw(2) << 1 + l.time.month()
+ << setw(2) << l.time.day()
+ << ' '
+ << setw(2) << l.time.hour() << ':'
+ << setw(2) << l.time.min() << ':'
+ << setw(2) << l.time.sec() << "."
+ << setw(6) << l.time.usec()
+ << ' '
+ << setfill(' ') << setw(5)
+ << l.thread_id << setfill('0')
+ << ' '
+ << l.filename << ':' << l.line_number << "]";
+ }
+
+
+To enable the use of ``CustomPrefix()``, simply give glog a pointer to it
+during initialization: ``InitGoogleLogging(argv[0], &CustomPrefix);``.
+
+Optionally, ``InitGoogleLogging()`` takes a third argument of type ``void*``
+to pass on to the callback function.
+
+Failure Signal Handler
+~~~~~~~~~~~~~~~~~~~~~~
+
+The library provides a convenient signal handler that will dump useful
+information when the program crashes on certain signals such as ``SIGSEGV``. The
+signal handler can be installed by :cpp:`google::InstallFailureSignalHandler()`.
+The following is an example of output from the signal handler.
+
+::
+
+ *** Aborted at 1225095260 (unix time) try "date -d @1225095260" if you are using GNU date ***
+ *** SIGSEGV (@0x0) received by PID 17711 (TID 0x7f893090a6f0) from PID 0; stack trace: ***
+ PC: @ 0x412eb1 TestWaitingLogSink::send()
+ @ 0x7f892fb417d0 (unknown)
+ @ 0x412eb1 TestWaitingLogSink::send()
+ @ 0x7f89304f7f06 google::LogMessage::SendToLog()
+ @ 0x7f89304f35af google::LogMessage::Flush()
+ @ 0x7f89304f3739 google::LogMessage::~LogMessage()
+ @ 0x408cf4 TestLogSinkWaitTillSent()
+ @ 0x4115de main
+ @ 0x7f892f7ef1c4 (unknown)
+ @ 0x4046f9 (unknown)
+
+By default, the signal handler writes the failure dump to the standard
+error. You can customize the destination by :cpp:`InstallFailureWriter()`.
+
+Performance of Messages
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The conditional logging macros provided by glog (e.g., ``CHECK``,
+``LOG_IF``, ``VLOG``, etc.) are carefully implemented and don’t execute
+the right hand side expressions when the conditions are false. So, the
+following check may not sacrifice the performance of your application.
+
+.. code:: cpp
+
+ CHECK(obj.ok) << obj.CreatePrettyFormattedStringButVerySlow();
+
+User-defined Failure Function
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``FATAL`` severity level messages or unsatisfied ``CHECK`` condition
+terminate your program. You can change the behavior of the termination
+by :cpp:`InstallFailureFunction`.
+
+.. code:: cpp
+
+ void YourFailureFunction() {
+ // Reports something...
+ exit(EXIT_FAILURE);
+ }
+
+ int main(int argc, char* argv[]) {
+ google::InstallFailureFunction(&YourFailureFunction);
+ }
+
+By default, glog tries to dump stacktrace and makes the program exit
+with status 1. The stacktrace is produced only when you run the program
+on an architecture for which glog supports stack tracing (as of
+September 2008, glog supports stack tracing for x86 and x86_64).
+
+Raw Logging
+~~~~~~~~~~~
+
+The header file ``<glog/raw_logging.h>`` can be used for thread-safe logging,
+which does not allocate any memory or acquire any locks. Therefore, the macros
+defined in this header file can be used by low-level memory allocation and
+synchronization code. Please check `src/glog/raw_logging.h.in
+<src/glog/raw_logging.h.in>`__ for detail.
+
+Google Style ``perror()``
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``PLOG()`` and ``PLOG_IF()`` and ``PCHECK()`` behave exactly like their
+``LOG*`` and ``CHECK`` equivalents with the addition that they append a
+description of the current state of errno to their output lines. E.g.
+
+.. code:: cpp
+
+ PCHECK(write(1, NULL, 2) >= 0) << "Write NULL failed";
+
+This check fails with the following error message.
+
+::
+
+ F0825 185142 test.cc:22] Check failed: write(1, NULL, 2) >= 0 Write NULL failed: Bad address [14]
+
+Syslog
+~~~~~~
+
+``SYSLOG``, ``SYSLOG_IF``, and ``SYSLOG_EVERY_N`` macros are available.
+These log to syslog in addition to the normal logs. Be aware that
+logging to syslog can drastically impact performance, especially if
+syslog is configured for remote logging! Make sure you understand the
+implications of outputting to syslog before you use these macros. In
+general, it’s wise to use these macros sparingly.
+
+Strip Logging Messages
+~~~~~~~~~~~~~~~~~~~~~~
+
+Strings used in log messages can increase the size of your binary and
+present a privacy concern. You can therefore instruct glog to remove all
+strings which fall below a certain severity level by using the
+``GOOGLE_STRIP_LOG`` macro:
+
+If your application has code like this:
+
+.. code:: cpp
+
+ #define GOOGLE_STRIP_LOG 1 // this must go before the #include!
+ #include <glog/logging.h>
+
+The compiler will remove the log messages whose severities are less than
+the specified integer value. Since ``VLOG`` logs at the severity level
+``INFO`` (numeric value ``0``), setting ``GOOGLE_STRIP_LOG`` to 1 or
+greater removes all log messages associated with ``VLOG``\ s as well as
+``INFO`` log statements.
+
+Automatically Remove Old Logs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To enable the log cleaner:
+
+.. code:: cpp
+
+ google::EnableLogCleaner(3); // keep your logs for 3 days
+
+And then glog will check if there are overdue logs whenever a flush is
+performed. In this example, any log file from your project whose last
+modified time is greater than 3 days will be unlink()ed.
+
+This feature can be disabled at any time (if it has been enabled)
+
+.. code:: cpp
+
+ google::DisableLogCleaner();
+
+Notes for Windows Users
+~~~~~~~~~~~~~~~~~~~~~~~
+
+glog defines a severity level ``ERROR``, which is also defined in
+``windows.h`` . You can make glog not define ``INFO``, ``WARNING``,
+``ERROR``, and ``FATAL`` by defining ``GLOG_NO_ABBREVIATED_SEVERITIES``
+before including ``glog/logging.h`` . Even with this macro, you can
+still use the iostream like logging facilities:
+
+.. code:: cpp
+
+ #define GLOG_NO_ABBREVIATED_SEVERITIES
+ #include <windows.h>
+ #include <glog/logging.h>
+
+ // ...
+
+ LOG(ERROR) << "This should work";
+ LOG_IF(ERROR, x > y) << "This should be also OK";
+
+However, you cannot use ``INFO``, ``WARNING``, ``ERROR``, and ``FATAL``
+anymore for functions defined in ``glog/logging.h`` .
+
+.. code:: cpp
+
+ #define GLOG_NO_ABBREVIATED_SEVERITIES
+ #include <windows.h>
+ #include <glog/logging.h>
+
+ // ...
+
+ // This won’t work.
+ // google::FlushLogFiles(google::ERROR);
+
+ // Use this instead.
+ google::FlushLogFiles(google::GLOG_ERROR);
+
+If you don’t need ``ERROR`` defined by ``windows.h``, there are a couple
+of more workarounds which sometimes don’t work:
+
+- ``#define WIN32_LEAN_AND_MEAN`` or ``NOGDI`` **before** you
+ ``#include windows.h``.
+- ``#undef ERROR`` **after** you ``#include windows.h`` .
+
+See `this
+issue <http://code.google.com/p/google-glog/issues/detail?id=33>`__ for
+more detail.
+
+
+Installation Notes for 64-bit Linux Systems
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The glibc built-in stack-unwinder on 64-bit systems has some problems with glog.
+(In particular, if you are using :cpp:`InstallFailureSignalHandler()`, the
+signal may be raised in the middle of malloc, holding some malloc-related locks
+when they invoke the stack unwinder. The built-in stack unwinder may call malloc
+recursively, which may require the thread to acquire a lock it already holds:
+deadlock.)
+
+For that reason, if you use a 64-bit system and you need
+:cpp:`InstallFailureSignalHandler()`, we strongly recommend you install
+``libunwind`` before trying to configure or install google glog.
+libunwind can be found
+`here <http://download.savannah.nongnu.org/releases/libunwind/libunwind-snap-070410.tar.gz>`__.
+
+Even if you already have ``libunwind`` installed, you will probably
+still need to install from the snapshot to get the latest version.
+
+Caution: if you install libunwind from the URL above, be aware that you
+may have trouble if you try to statically link your binary with glog:
+that is, if you link with ``gcc -static -lgcc_eh ...``. This is because
+both ``libunwind`` and ``libgcc`` implement the same C++ exception
+handling APIs, but they implement them differently on some platforms.
+This is not likely to be a problem on ia64, but may be on x86-64.
+
+Also, if you link binaries statically, make sure that you add
+:cmd:`-Wl,--eh-frame-hdr` to your linker options. This is required so that
+``libunwind`` can find the information generated by the compiler required for
+stack unwinding.
+
+Using :cmd:`-static` is rare, though, so unless you know this will affect you it
+probably won’t.
+
+If you cannot or do not wish to install libunwind, you can still try to
+use two kinds of stack-unwinder: 1. glibc built-in stack-unwinder and 2.
+frame pointer based stack-unwinder.
+
+1. As we already mentioned, glibc’s unwinder has a deadlock issue.
+ However, if you don’t use :cpp:`InstallFailureSignalHandler()` or you
+ don’t worry about the rare possibilities of deadlocks, you can use
+ this stack-unwinder. If you specify no options and ``libunwind``
+ isn’t detected on your system, the configure script chooses this
+ unwinder by default.
+
+2. The frame pointer based stack unwinder requires that your
+ application, the glog library, and system libraries like libc, all be
+ compiled with a frame pointer. This is *not* the default for x86-64.
+
+
+How to Contribute
+-----------------
+
+We’d love to accept your patches and contributions to this project.
+There are a just a few small guidelines you need to follow.
+
+Contributor License Agreement (CLA)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Contributions to any Google project must be accompanied by a Contributor
+License Agreement. This is not a copyright **assignment**, it simply
+gives Google permission to use and redistribute your contributions as
+part of the project.
+
+* If you are an individual writing original source code and you’re sure
+ you own the intellectual property, then you’ll need to sign an
+ `individual
+ CLA <https://developers.google.com/open-source/cla/individual>`__.
+* If you work for a company that wants to allow you to contribute your
+ work, then you’ll need to sign a `corporate
+ CLA <https://developers.google.com/open-source/cla/corporate>`__.
+
+You generally only need to submit a CLA once, so if you’ve already
+submitted one (even if it was for a different project), you probably
+don’t need to do it again.
+
+Once your CLA is submitted (or if you already submitted one for another
+Google project), make a commit adding yourself to the
+`AUTHORS <./AUTHORS>`__ and `CONTRIBUTORS <./CONTRIBUTORS>`__ files. This
+commit can be part of your first `pull
+request <https://help.github.com/articles/creating-a-pull-request>`__.
+
+Submitting a Patch
+~~~~~~~~~~~~~~~~~~
+
+1. It’s generally best to start by opening a new issue describing the
+ bug or feature you’re intending to fix. Even if you think it’s
+ relatively minor, it’s helpful to know what people are working on.
+ Mention in the initial issue that you are planning to work on that
+ bug or feature so that it can be assigned to you.
+2. Follow the normal process of
+ `forking <https://help.github.com/articles/fork-a-repo>`__ the
+ project, and setup a new branch to work in. It’s important that each
+ group of changes be done in separate branches in order to ensure that
+ a pull request only includes the commits related to that bug or
+ feature.
+3. Do your best to have `well-formed commit
+ messages <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html>`__
+ for each change. This provides consistency throughout the project,
+ and ensures that commit messages are able to be formatted properly by
+ various git tools.
+4. Finally, push the commits to your fork and submit a `pull
+ request <https://help.github.com/articles/creating-a-pull-request>`__.
+
+
+.. |Linux Github actions| image:: https://github.com/google/glog/actions/workflows/linux.yml/badge.svg
+ :target: https://github.com/google/glog/actions
+.. |Windows Github actions| image:: https://github.com/google/glog/actions/workflows/windows.yml/badge.svg
+ :target: https://github.com/google/glog/actions
+.. |macOS Github actions| image:: https://github.com/google/glog/actions/workflows/macos.yml/badge.svg
+ :target: https://github.com/google/glog/actions
+.. |Total alerts| image:: https://img.shields.io/lgtm/alerts/g/google/glog.svg?logo=lgtm&logoWidth=18
+ :target: https://lgtm.com/projects/g/google/glog/alerts/
+.. |Language grade: C++| image:: https://img.shields.io/lgtm/grade/cpp/g/google/glog.svg?logo=lgtm&logoWidth=18)
+ :target: https://lgtm.com/projects/g/google/glog/context:cpp
+.. |Codecov| image:: https://codecov.io/gh/google/glog/branch/master/graph/badge.svg?token=8an420vNju
+ :target: https://codecov.io/gh/google/glog