From c9edf6ad787890a4340ce1e39bb2db0e075304b3 Mon Sep 17 00:00:00 2001 From: Yong Li Date: Tue, 1 May 2018 14:43:31 +0000 Subject: [PATCH] Allow disabling rosout file logging (to rosout.log) See issue #1380. --- tools/rosout/rosout.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/rosout/rosout.cpp b/tools/rosout/rosout.cpp index e1f15712b6..ae8837ca46 100644 --- a/tools/rosout/rosout.cpp +++ b/tools/rosout/rosout.cpp @@ -120,6 +120,12 @@ class Rosout { agg_pub_.publish(msg); + bool disable_file_logging = false; + if (node_.getParamCached("/rosout/disable_file_logging", disable_file_logging) && disable_file_logging) + { + return; + } + std::stringstream ss; ss << msg->header.stamp << " "; switch (msg->level)