Repository: mesos Updated Branches: refs/heads/master 725dfcd83 -> 0a8421612
Replaced std::cerr by LOG(ERROR) in process.cpp. Review: https://reviews.apache.org/r/63146/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0a842161 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0a842161 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0a842161 Branch: refs/heads/master Commit: 0a8421612b30f342670f97b72b4097a413f53470 Parents: 725dfcd Author: Armand Grillet <agril...@mesosphere.io> Authored: Thu Oct 19 11:51:33 2017 -0700 Committer: Alexander Rukletsov <al...@apache.org> Committed: Thu Oct 19 11:58:44 2017 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/src/process.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/0a842161/3rdparty/libprocess/src/process.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/process.cpp b/3rdparty/libprocess/src/process.cpp index 2334e26..4d8d483 100644 --- a/3rdparty/libprocess/src/process.cpp +++ b/3rdparty/libprocess/src/process.cpp @@ -46,7 +46,6 @@ #include <deque> #include <fstream> #include <iomanip> -#include <iostream> #include <list> #include <map> #include <memory> // TODO(benh): Replace shared_ptr with unique_ptr. @@ -3343,13 +3342,12 @@ void ProcessManager::resume(ProcessBase* process) try { process->serve(*event); } catch (const std::exception& e) { - std::cerr << "libprocess: " << process->pid - << " terminating due to " - << e.what() << std::endl; + LOG(ERROR) << "libprocess: " << process->pid + << " terminating due to " << e.what(); terminate = true; } catch (...) { - std::cerr << "libprocess: " << process->pid - << " terminating due to unknown exception" << std::endl; + LOG(ERROR) << "libprocess: " << process->pid + << " terminating due to unknown exception"; terminate = true; } @@ -4271,8 +4269,8 @@ bool wait(const UPID& pid, const Duration& duration) // This could result in a deadlock if some code decides to wait on a // process that has invoked that code! if (__process__ != nullptr && __process__->self() == pid) { - std::cerr << "\n**** DEADLOCK DETECTED! ****\nYou are waiting on process " - << pid << " that it is currently executing." << std::endl; + LOG(ERROR) << "\n**** DEADLOCK DETECTED! ****\nYou are waiting on process " + << pid << " that it is currently executing."; } if (duration == Seconds(-1)) {