From 779a19d5deda5476038bda618db7af0e42f94e2e Mon Sep 17 00:00:00 2001 From: Jesse Lee Date: Tue, 24 Nov 2020 15:22:39 -0500 Subject: [PATCH] Set unexpected/network error to WARNING log level --- mindspore/ccsrc/minddata/dataset/util/status.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/minddata/dataset/util/status.cc b/mindspore/ccsrc/minddata/dataset/util/status.cc index b2ab3362e9..8aee38faa9 100644 --- a/mindspore/ccsrc/minddata/dataset/util/status.cc +++ b/mindspore/ccsrc/minddata/dataset/util/status.cc @@ -114,7 +114,11 @@ Status::Status(const StatusCode code, int line_of_code, const char *file_name, c ss << "File : " << file_name << "\n"; } err_msg_ = ss.str(); - MS_LOG(INFO) << err_msg_; + if (code == StatusCode::kUnexpectedError || code == StatusCode::kNetWorkError) { + MS_LOG(WARNING) << err_msg_; + } else { + MS_LOG(INFO) << err_msg_; + } } std::ostream &operator<<(std::ostream &os, const Status &s) {