Log lines can be customized for parsing by an external tool.
To simplify such customization and parsing, there should be an option to
customize the file header, or at least to disable adding it.
Calling FormatMessage without a FORMAT_MESSAGE_IGNORE_INSERTS flag could
cause trouble, as explained in an article by Raymond Chen:
* The importance of the FORMAT_MESSAGE_IGNORE_INSERTS flag
https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353
The previous approach used
--incompatible_enable_cc_toolchain_resolution, which is recommended by
the docs, but a Bazel developer told me it's obsolete. The new, old
approach is simpler and should stop the warning from being user-visible.
Use GetExistingTempDirectories() (which uses GetTempDirectories() which respects
TEST_TMPDIR, TMPDIR, TMP environmental variables) for FLAGS_test_tmpdir variable
used in some tests.
Fixes: #793
Currently, glog allows to use of logtostderr to send error logs to
stderr, but many log tailers would regard logs from stderr as error
logs. So we want to send non-error logs to stdout and only send error
logs to stderr according to the stderrthreshold.
Correct syntax to run CMake built-in command-line tools is `cmake -E`:
https://cmake.org/cmake/help/v3.23/manual/cmake.1.html#run-a-command-line-tool
This test was mistakenly using `cmake env ... cmake ...`, where `env` and second `cmake`
were interpreted as paths (of source directory or build directory), resulting
in "Ignoring extra path from command line" CMake warnings with CMake 3.23:
eacf1f879b
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.
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>
I previously made a minor documentation fix in
https://github.com/google/glog/pull/747. According to README, this
commit adds myself to AUTHORS and CONTRIBUTORS.
The log filename format does not match the example in the line below. One of them must be incorrect. This commit changes the format to match the example.