diff options
author | Gil <mcg@google.com> | 2018-05-23 07:00:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 07:00:05 -0700 |
commit | af19a1b07245b7d0be4fd492bd3731964937c7c6 (patch) | |
tree | e19db1c38a0de792ef8f49b259f34d0dab252fb1 /Firestore/core/src/firebase/firestore/util/string_format.h | |
parent | 23f8320148672310ff71aa3ef2b6c3ac86d47ede (diff) |
Reimplement C++ logging (#1313)
* Add direct support for formatting Objective-C objects
* Rewrite log.h
* Convert FSTWarn to LOG_WARN
* Convert FSTLog to LOG_DEBUG
* Remove FSTLogger
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util/string_format.h')
-rw-r--r-- | Firestore/core/src/firebase/firestore/util/string_format.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/string_format.h b/Firestore/core/src/firebase/firestore/util/string_format.h index 3d7a1dc..f8da785 100644 --- a/Firestore/core/src/firebase/firestore/util/string_format.h +++ b/Firestore/core/src/firebase/firestore/util/string_format.h @@ -21,6 +21,7 @@ #include <string> #include <utility> +#include "Firestore/core/src/firebase/firestore/util/string_apple.h" #include "absl/base/attributes.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" @@ -66,6 +67,12 @@ class FormatArg : public absl::AlphaNum { : FormatArg{std::forward<T>(value), internal::FormatChoice<0>{}} { } +#if __OBJC__ + FormatArg(NSObject* object) // NOLINT(runtime/explicit) + : AlphaNum{MakeStringView([object description])} { + } +#endif + private: /** * Creates a FormatArg from a boolean value, representing the string |