From 5016d8c7b803f8c0a312198e2635091ebe52f159 Mon Sep 17 00:00:00 2001 From: Lucian Grijincu Date: Tue, 14 Jul 2015 10:31:26 -0700 Subject: [PATCH] folly: AsyncIOOp: improve logging message: add strerror Reviewed By: @philippv Differential Revision: D2240628 --- folly/experimental/io/AsyncIO.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/folly/experimental/io/AsyncIO.cpp b/folly/experimental/io/AsyncIO.cpp index ce540e62..491db24f 100644 --- a/folly/experimental/io/AsyncIO.cpp +++ b/folly/experimental/io/AsyncIO.cpp @@ -368,7 +368,11 @@ std::ostream& operator<<(std::ostream& os, const AsyncIOOp& op) { } if (op.state_ == AsyncIOOp::State::COMPLETED) { - os << "result=" << op.result_ << ", "; + os << "result=" << op.result_; + if (op.result_ < 0) { + os << " (" << errnoStr(-op.result_) << ')'; + } + os << ", "; } return os << "}"; -- 2.34.1