From af19a1b07245b7d0be4fd492bd3731964937c7c6 Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 23 May 2018 07:00:05 -0700 Subject: 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 --- Firestore/core/src/firebase/firestore/util/string_format.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Firestore/core/src/firebase/firestore/util/string_format.h') 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 #include +#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(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 -- cgit v1.2.3