diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-06-15 18:21:48 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-06-15 18:24:01 -0700 |
commit | e96ff30120a3834f7d1e31e43e591bf7cfbd731f (patch) | |
tree | 7e4c317912ac3809fbff11bb692084debd4a27eb /src/google/protobuf/stubs/common.cc | |
parent | 4cbb612299eaf8259db25f5dcda46022fbd1db54 (diff) |
Down-integrate from internal code base.
[ci skip]
Change-Id: I9391c09640e0b0b2b21c45a97a1fc91814d95c5d
Diffstat (limited to 'src/google/protobuf/stubs/common.cc')
-rw-r--r-- | src/google/protobuf/stubs/common.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/common.cc b/src/google/protobuf/stubs/common.cc index 54e00ccb..b895d915 100644 --- a/src/google/protobuf/stubs/common.cc +++ b/src/google/protobuf/stubs/common.cc @@ -32,6 +32,8 @@ #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> +#include <google/protobuf/stubs/status.h> +#include <google/protobuf/stubs/stringpiece.h> #include <stdio.h> #include <errno.h> #include <vector> @@ -148,6 +150,17 @@ LogMessage& LogMessage::operator<<(const char* value) { return *this; } +LogMessage& LogMessage::operator<<(const StringPiece& value) { + message_ += value.ToString(); + return *this; +} + +LogMessage& LogMessage::operator<<( + const ::google::protobuf::util::Status& status) { + message_ += status.ToString(); + return *this; +} + // Since this is just for logging, we don't care if the current locale changes // the results -- in fact, we probably prefer that. So we use snprintf() // instead of Simple*toa(). |