From 66d9b563cec4a4640877407be63b99fcdbdcf9b7 Mon Sep 17 00:00:00 2001 From: John Knox Date: Wed, 4 Sep 2019 09:23:45 -0700 Subject: [PATCH] Record state error msg in debug log Summary: When an operation fails, we have an error message. This was being displayed in the diagnostic screen output, but not included in the debug log. This makes them both have same bahaviour, so they both include the error messages. Reviewed By: passy Differential Revision: D17181847 fbshipit-source-id: 823f73d641d2315da86a0019479716852950f9a5 --- xplat/Flipper/FlipperState.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xplat/Flipper/FlipperState.cpp b/xplat/Flipper/FlipperState.cpp index 18263c906..1b0f3e629 100644 --- a/xplat/Flipper/FlipperState.cpp +++ b/xplat/Flipper/FlipperState.cpp @@ -49,10 +49,11 @@ void FlipperState::success(std::string step) { } void FlipperState::failed(std::string step, std::string errorMessage) { + std::string message = "[Failed] " + step + ": " + errorMessage; #if FLIPPER_DEBUG_LOG - log("[failed] " + step); + log(message); #endif - logs = logs + "[Failed] " + step + ": " + errorMessage + "\n"; + logs = logs + message + "\n"; stateMap[step] = State::failed; if (mListener) { mListener->onUpdate();