|
|
|
@ -105,13 +105,7 @@ namespace internal { |
|
|
|
|
const char kDebugStringSilentMarker[] = ""; |
|
|
|
|
const char kDebugStringSilentMarkerForDetection[] = "\t "; |
|
|
|
|
|
|
|
|
|
// Controls insertion of a marker making debug strings non-parseable.
|
|
|
|
|
PROTOBUF_EXPORT std::atomic<bool> enable_debug_text_redaction_marker; |
|
|
|
|
|
|
|
|
|
// Controls insertion of a randomized marker in debug strings.
|
|
|
|
|
PROTOBUF_EXPORT std::atomic<bool> enable_debug_text_random_marker; |
|
|
|
|
|
|
|
|
|
// Controls insertion of kDebugStringSilentMarker.
|
|
|
|
|
// Controls insertion of kDebugStringSilentMarker into DebugString() output.
|
|
|
|
|
PROTOBUF_EXPORT std::atomic<bool> enable_debug_text_format_marker; |
|
|
|
|
|
|
|
|
|
int64_t GetRedactedFieldCount() { |
|
|
|
@ -128,12 +122,6 @@ std::string Message::DebugString() const { |
|
|
|
|
printer.SetExpandAny(true); |
|
|
|
|
printer.SetInsertSilentMarker(internal::enable_debug_text_format_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
printer.SetRedactDebugString( |
|
|
|
|
internal::enable_debug_text_redaction_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
printer.SetRandomizeDebugString( |
|
|
|
|
internal::enable_debug_text_random_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
|
|
|
|
|
printer.PrintToString(*this, &debug_string); |
|
|
|
|
|
|
|
|
@ -150,12 +138,6 @@ std::string Message::ShortDebugString() const { |
|
|
|
|
printer.SetExpandAny(true); |
|
|
|
|
printer.SetInsertSilentMarker(internal::enable_debug_text_format_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
printer.SetRedactDebugString( |
|
|
|
|
internal::enable_debug_text_redaction_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
printer.SetRandomizeDebugString( |
|
|
|
|
internal::enable_debug_text_random_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
|
|
|
|
|
printer.PrintToString(*this, &debug_string); |
|
|
|
|
// Single line mode currently might have an extra space at the end.
|
|
|
|
@ -176,12 +158,6 @@ std::string Message::Utf8DebugString() const { |
|
|
|
|
printer.SetExpandAny(true); |
|
|
|
|
printer.SetInsertSilentMarker(internal::enable_debug_text_format_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
printer.SetRedactDebugString( |
|
|
|
|
internal::enable_debug_text_redaction_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
printer.SetRandomizeDebugString( |
|
|
|
|
internal::enable_debug_text_random_marker.load( |
|
|
|
|
std::memory_order_relaxed)); |
|
|
|
|
|
|
|
|
|
printer.PrintToString(*this, &debug_string); |
|
|
|
|
|
|
|
|
|