1 From 94465d6287e8f54c99f4b0b891a6c618bb80d7ce Mon Sep 17 00:00:00 2001
2 From: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>
3 Date: Wed, 26 Oct 2022 07:32:59 +0200
4 Subject: [PATCH] Support only GLog >=0.6.0
6 Fixes https://github.com/pytorch/pytorch/issues/58054
8 c10/util/Logging.cpp | 12 +-----------
9 1 file changed, 1 insertion(+), 11 deletions(-)
11 diff --git a/c10/util/Logging.cpp b/c10/util/Logging.cpp
12 index fe74e49548646..d8fce12ce4840 100644
13 --- a/c10/util/Logging.cpp
14 +++ b/c10/util/Logging.cpp
15 @@ -192,23 +192,13 @@ C10_DEFINE_int(
17 "The minimum log level that caffe2 will output.");
19 -// Google glog's api does not have an external function that allows one to check
20 -// if glog is initialized or not. It does have an internal function - so we are
21 -// declaring it here. This is a hack but has been used by a bunch of others too
24 -namespace glog_internal_namespace_ {
25 -bool IsGoogleLoggingInitialized();
26 -} // namespace glog_internal_namespace_
27 -} // namespace google
32 void initGoogleLogging(char const* name) {
33 #if !defined(_MSC_VER)
34 // This trick can only be used on UNIX platforms
35 - if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized())
36 + if (!::google::IsGoogleLoggingInitialized())
39 ::google::InitGoogleLogging(name);