Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port gazebo Console log size reduction to ignition #47

Closed
osrf-migration opened this issue Mar 16, 2019 · 2 comments
Closed

Port gazebo Console log size reduction to ignition #47

osrf-migration opened this issue Mar 16, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@osrf-migration
Copy link

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


ign-common and gazebo use similar color console mechanisms, but the log files can be very large. A gazebo pull request helped reduce it a bit, but it hasn't yet been merged to ign-common.

diff --git a/gazebo/common/Console.cc b/gazebo/common/Console.cc
--- a/gazebo/common/Console.cc
+++ b/gazebo/common/Console.cc
@@ -77,9 +77,11 @@
   int index = _file.find_last_of("/") + 1;
 
   Console::log << "(" << Time::GetWallTime() << ") ";
-  (*this) << this->prefix
+  std::stringstream prefixString;
+  prefixString << this->prefix
     << "[" << _file.substr(index , _file.size() - index) << ":"
     << _line << "] ";
+  (*this) << prefixString.str();
 
   return (*this);
 }
@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


pull request #185

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • changed state from "new" to "resolved"

pr #185

@osrf-migration osrf-migration added minor enhancement New feature or request labels Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant