From f468d6e5d0c1972c804266b16157aea5e679712f Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 26 May 2022 16:15:59 -0700 Subject: [PATCH] Migrate `igndbg` -> `gzdbg` Signed-off-by: methylDragon --- src/Application.cc | 22 +++++++++---------- src/plugins/camera_tracking/CameraTracking.cc | 2 +- src/plugins/grid_config/GridConfig.cc | 4 ++-- .../InteractiveViewControl.cc | 2 +- src/plugins/marker_manager/MarkerManager.cc | 6 ++--- src/plugins/minimal_scene/MinimalScene.cc | 16 +++++++------- src/plugins/point_cloud/PointCloud.cc | 2 +- src/plugins/scene3d/Scene3D.cc | 6 ++--- src/plugins/screenshot/Screenshot.cc | 4 ++-- .../TransportSceneManager.cc | 2 +- src/plugins/world_control/WorldControl.cc | 4 ++-- test/integration/ExamplesBuild_TEST.cc | 4 ++-- test/integration/Examples_TEST.cc | 2 +- test/integration/marker_manager.cc | 2 +- 14 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/Application.cc b/src/Application.cc index 3cf28f615..79d2063ba 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -91,7 +91,7 @@ using namespace gui; Application::Application(int &_argc, char **_argv, const WindowType _type) : QApplication(_argc, _argv), dataPtr(new ApplicationPrivate) { - igndbg << "Initializing application." << std::endl; + gzdbg << "Initializing application." << std::endl; this->setOrganizationName("Gazebo"); this->setOrganizationDomain("gazebosim.org"); @@ -99,7 +99,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) #if __APPLE__ // Use the Metal graphics API on macOS. - igndbg << "Qt using Metal graphics interface" << std::endl; + gzdbg << "Qt using Metal graphics interface" << std::endl; QQuickWindow::setSceneGraphBackend(QSGRendererInterface::MetalRhi); // TODO(srmainwaring): implement facility for overriding the default @@ -117,7 +117,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) // QSurfaceFormat::setDefaultFormat(format); #else // Otherwise use OpenGL - igndbg << "Qt using OpenGL graphics interface" << std::endl; + gzdbg << "Qt using OpenGL graphics interface" << std::endl; #endif // Configure console @@ -162,7 +162,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) ///////////////////////////////////////////////// Application::~Application() { - igndbg << "Terminating application." << std::endl; + gzdbg << "Terminating application." << std::endl; if (this->dataPtr->mainWin && this->dataPtr->mainWin->QuickWindow()) { @@ -292,7 +292,7 @@ bool Application::LoadConfig(const std::string &_config) // Process window properties if (auto winElem = doc.FirstChildElement("window")) { - igndbg << "Loading window config" << std::endl; + gzdbg << "Loading window config" << std::endl; tinyxml2::XMLPrinter printer; if (!winElem->Accept(&printer)) @@ -422,7 +422,7 @@ bool Application::LoadPlugin(const std::string &_filename, return false; } - igndbg << "Loading plugin [" << _filename << "]" << std::endl; + gzdbg << "Loading plugin [" << _filename << "]" << std::endl; common::SystemPaths systemPaths; systemPaths.SetPluginPathEnv(this->dataPtr->pluginPathEnv); @@ -559,7 +559,7 @@ std::shared_ptr Application::PluginByName( ///////////////////////////////////////////////// bool Application::InitializeMainWindow() { - igndbg << "Create main window" << std::endl; + gzdbg << "Create main window" << std::endl; this->dataPtr->mainWin = new MainWindow(); if (!this->dataPtr->mainWin->QuickWindow()) @@ -573,7 +573,7 @@ bool Application::InitializeMainWindow() ///////////////////////////////////////////////// bool Application::ApplyConfig() { - igndbg << "Applying config" << std::endl; + gzdbg << "Applying config" << std::endl; if (!this->dataPtr->mainWin) return false; @@ -652,7 +652,7 @@ bool Application::AddPluginsToWindow() ///////////////////////////////////////////////// bool Application::InitializeDialogs() { - igndbg << "Initialize dialogs" << std::endl; + gzdbg << "Initialize dialogs" << std::endl; while (!this->dataPtr->pluginsToAdd.empty()) { @@ -689,7 +689,7 @@ bool Application::InitializeDialogs() this->dataPtr->pluginsAdded.push_back(plugin); auto title = QString::fromStdString(plugin->Title()); - igndbg << "Initialized dialog [" << title.toStdString() << "]" << std::endl; + gzdbg << "Initialized dialog [" << title.toStdString() << "]" << std::endl; } if (this->dataPtr->pluginsAdded.empty()) @@ -802,7 +802,7 @@ void ApplicationPrivate::MessageHandler(QtMsgType _type, switch (_type) { case QtDebugMsg: - igndbg << msg << std::endl; + gzdbg << msg << std::endl; break; case QtInfoMsg: gzmsg << msg << std::endl; diff --git a/src/plugins/camera_tracking/CameraTracking.cc b/src/plugins/camera_tracking/CameraTracking.cc index c4d2803d4..f24db0586 100644 --- a/src/plugins/camera_tracking/CameraTracking.cc +++ b/src/plugins/camera_tracking/CameraTracking.cc @@ -178,7 +178,7 @@ void CameraTrackingPrivate::Initialize() if (cam) { this->camera = cam; - igndbg << "CameraTrackingPrivate plugin is moving camera [" + gzdbg << "CameraTrackingPrivate plugin is moving camera [" << this->camera->Name() << "]" << std::endl; break; } diff --git a/src/plugins/grid_config/GridConfig.cc b/src/plugins/grid_config/GridConfig.cc index 522239545..5ed9b5e74 100644 --- a/src/plugins/grid_config/GridConfig.cc +++ b/src/plugins/grid_config/GridConfig.cc @@ -201,7 +201,7 @@ void GridConfig::CreateGrids() this->dataPtr->dirty = true; - igndbg << "Created grid [" << grid->Name() << "]" << std::endl; + gzdbg << "Created grid [" << grid->Name() << "]" << std::endl; } this->dataPtr->startupGrids.clear(); } @@ -276,7 +276,7 @@ void GridConfig::ConnectToGrid() { this->dataPtr->grid = grid; - igndbg << "Connected to grid [" << grid->Name() << "]" << std::endl; + gzdbg << "Connected to grid [" << grid->Name() << "]" << std::endl; // TODO(chapulina) Set to the grid's visible state when that's available // through ign-rendering's API diff --git a/src/plugins/interactive_view_control/InteractiveViewControl.cc b/src/plugins/interactive_view_control/InteractiveViewControl.cc index c05cbe9fa..7f394f6cd 100644 --- a/src/plugins/interactive_view_control/InteractiveViewControl.cc +++ b/src/plugins/interactive_view_control/InteractiveViewControl.cc @@ -127,7 +127,7 @@ void InteractiveViewControlPrivate::OnRender() if (isUserCamera) { this->camera = cam; - igndbg << "InteractiveViewControl plugin is moving camera [" + gzdbg << "InteractiveViewControl plugin is moving camera [" << this->camera->Name() << "]" << std::endl; break; } diff --git a/src/plugins/marker_manager/MarkerManager.cc b/src/plugins/marker_manager/MarkerManager.cc index cda3c960d..26e28f48a 100644 --- a/src/plugins/marker_manager/MarkerManager.cc +++ b/src/plugins/marker_manager/MarkerManager.cc @@ -170,7 +170,7 @@ void MarkerManagerPrivate::Initialize() << "/list service.\n"; } - igndbg << "Advertise " << this->topicName << "/list service.\n"; + gzdbg << "Advertise " << this->topicName << "/list service.\n"; // Advertise to the marker service if (!this->node.Advertise(this->topicName, @@ -180,7 +180,7 @@ void MarkerManagerPrivate::Initialize() << " service.\n"; } - igndbg << "Advertise " << this->topicName << "/list.\n"; + gzdbg << "Advertise " << this->topicName << "/list.\n"; // Advertise to the marker_array service if (!this->node.Advertise(this->topicName + "_array", @@ -190,7 +190,7 @@ void MarkerManagerPrivate::Initialize() << "_array service.\n"; } - igndbg << "Advertise " << this->topicName << "_array.\n"; + gzdbg << "Advertise " << this->topicName << "_array.\n"; } ///////////////////////////////////////////////// diff --git a/src/plugins/minimal_scene/MinimalScene.cc b/src/plugins/minimal_scene/MinimalScene.cc index 3b7e2f55f..24ea2198a 100644 --- a/src/plugins/minimal_scene/MinimalScene.cc +++ b/src/plugins/minimal_scene/MinimalScene.cc @@ -580,7 +580,7 @@ std::string IgnRenderer::Initialize() "time."; } - igndbg << "Create scene [" << this->sceneName << "]" << std::endl; + gzdbg << "Create scene [" << this->sceneName << "]" << std::endl; auto scene = engine->CreateScene(this->sceneName); if (nullptr == scene) { @@ -631,14 +631,14 @@ void IgnRenderer::SetGraphicsAPI(const rendering::GraphicsAPI &_graphicsAPI) if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { - igndbg << "Creating ign-rendering interface for OpenGL" << std::endl; + gzdbg << "Creating ign-rendering interface for OpenGL" << std::endl; this->dataPtr->rhiParams["useCurrentGLContext"] = "1"; this->dataPtr->rhi = std::make_unique(); } #ifdef __APPLE__ else if (_graphicsAPI == rendering::GraphicsAPI::METAL) { - igndbg << "Creating ign-renderering interface for Metal" << std::endl; + gzdbg << "Creating ign-renderering interface for Metal" << std::endl; this->dataPtr->rhiParams["metal"] = "1"; this->dataPtr->rhi = std::make_unique(); } @@ -659,7 +659,7 @@ void IgnRenderer::Destroy() // If that was the last sensor, destroy scene if (scene->SensorCount() == 0) { - igndbg << "Destroy scene [" << scene->Name() << "]" << std::endl; + gzdbg << "Destroy scene [" << scene->Name() << "]" << std::endl; engine->DestroyScene(scene); // TODO(anyone) If that was the last scene, terminate engine? @@ -785,13 +785,13 @@ void RenderThread::SetGraphicsAPI(const rendering::GraphicsAPI &_graphicsAPI) // Create the render interface if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { - igndbg << "Creating render thread interface for OpenGL" << std::endl; + gzdbg << "Creating render thread interface for OpenGL" << std::endl; this->rhi = std::make_unique(&this->ignRenderer); } #ifdef __APPLE__ else if (_graphicsAPI == rendering::GraphicsAPI::METAL) { - igndbg << "Creating render thread interface for Metal" << std::endl; + gzdbg << "Creating render thread interface for Metal" << std::endl; this->rhi = std::make_unique(&this->ignRenderer); } #endif @@ -817,13 +817,13 @@ TextureNode::TextureNode( { if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { - igndbg << "Creating texture node render interface for OpenGL" << std::endl; + gzdbg << "Creating texture node render interface for OpenGL" << std::endl; this->rhi = std::make_unique(_window); } #ifdef __APPLE__ else if (_graphicsAPI == rendering::GraphicsAPI::METAL) { - igndbg << "Creating texture node render interface for Metal" << std::endl; + gzdbg << "Creating texture node render interface for Metal" << std::endl; this->rhi = std::make_unique(_window); } #endif diff --git a/src/plugins/point_cloud/PointCloud.cc b/src/plugins/point_cloud/PointCloud.cc index c0a7c8ca6..ad55d4b24 100644 --- a/src/plugins/point_cloud/PointCloud.cc +++ b/src/plugins/point_cloud/PointCloud.cc @@ -435,7 +435,7 @@ void PointCloudPrivate::ClearMarkers() msg.set_id(0); msg.set_action(gz::msgs::Marker::DELETE_ALL); - igndbg << "Clearing markers on " + gzdbg << "Clearing markers on " << this->pointCloudTopic + this->floatVTopic << std::endl; diff --git a/src/plugins/scene3d/Scene3D.cc b/src/plugins/scene3d/Scene3D.cc index 00a91c79b..574bced9d 100644 --- a/src/plugins/scene3d/Scene3D.cc +++ b/src/plugins/scene3d/Scene3D.cc @@ -313,7 +313,7 @@ void SceneManager::Request() if (publishers.size() > 0) break; std::this_thread::sleep_for(sleepDuration); - igndbg << "Waiting for service " << this->service << "\n"; + gzdbg << "Waiting for service " << this->service << "\n"; } if (publishers.empty() || @@ -1149,7 +1149,7 @@ std::string IgnRenderer::Initialize() auto scene = engine->SceneByName(this->sceneName); if (!scene) { - igndbg << "Create scene [" << this->sceneName << "]" << std::endl; + gzdbg << "Create scene [" << this->sceneName << "]" << std::endl; scene = engine->CreateScene(this->sceneName); scene->SetAmbientLight(this->ambientLight); scene->SetBackgroundColor(this->backgroundColor); @@ -1205,7 +1205,7 @@ void IgnRenderer::Destroy() // If that was the last sensor, destroy scene if (scene->SensorCount() == 0) { - igndbg << "Destroy scene [" << scene->Name() << "]" << std::endl; + gzdbg << "Destroy scene [" << scene->Name() << "]" << std::endl; engine->DestroyScene(scene); // TODO(anyone) If that was the last scene, terminate engine? diff --git a/src/plugins/screenshot/Screenshot.cc b/src/plugins/screenshot/Screenshot.cc index d89b1b6dd..a5ed1eee7 100644 --- a/src/plugins/screenshot/Screenshot.cc +++ b/src/plugins/screenshot/Screenshot.cc @@ -168,7 +168,7 @@ void Screenshot::SaveScreenshot() image.SetFromData(cameraImage.Data(), width, height, format); image.SavePNG(savePath); - igndbg << "Saved image to [" << savePath << "]" << std::endl; + gzdbg << "Saved image to [" << savePath << "]" << std::endl; this->dataPtr->dirty = false; @@ -194,7 +194,7 @@ void Screenshot::FindUserCamera() if (nullptr != cam) { this->dataPtr->userCamera = cam; - igndbg << "Screenshot plugin taking pictures of camera [" + gzdbg << "Screenshot plugin taking pictures of camera [" << this->dataPtr->userCamera->Name() << "]" << std::endl; break; } diff --git a/src/plugins/transport_scene_manager/TransportSceneManager.cc b/src/plugins/transport_scene_manager/TransportSceneManager.cc index aa928f5db..a9322a46d 100644 --- a/src/plugins/transport_scene_manager/TransportSceneManager.cc +++ b/src/plugins/transport_scene_manager/TransportSceneManager.cc @@ -324,7 +324,7 @@ void TransportSceneManagerPrivate::Request() if (publishers.size() > 0) break; std::this_thread::sleep_for(sleepDuration); - igndbg << "Waiting for service [" << this->service << "]\n"; + gzdbg << "Waiting for service [" << this->service << "]\n"; } if (publishers.empty() || !this->node.Request(this->service, diff --git a/src/plugins/world_control/WorldControl.cc b/src/plugins/world_control/WorldControl.cc index f193016d2..fea859288 100644 --- a/src/plugins/world_control/WorldControl.cc +++ b/src/plugins/world_control/WorldControl.cc @@ -242,9 +242,9 @@ void WorldControl::LoadConfig(const tinyxml2::XMLElement *_pluginElem) elem->QueryBoolText(&this->dataPtr->useEvent); if (this->dataPtr->useEvent) - igndbg << "Using an event to share WorldControl msgs with the server\n"; + gzdbg << "Using an event to share WorldControl msgs with the server\n"; else - igndbg << "Using a service to share WorldControl msgs with the server\n"; + gzdbg << "Using a service to share WorldControl msgs with the server\n"; } ///////////////////////////////////////////////// diff --git a/test/integration/ExamplesBuild_TEST.cc b/test/integration/ExamplesBuild_TEST.cc index ff461ba36..594bc4a91 100644 --- a/test/integration/ExamplesBuild_TEST.cc +++ b/test/integration/ExamplesBuild_TEST.cc @@ -146,13 +146,13 @@ void ExamplesBuild::Build(const std::string &_type) // Source directory for this example auto sourceDir = examplesDir + "/" + base; ASSERT_TRUE(gz::common::exists(sourceDir)); - igndbg << "Source: " << sourceDir << std::endl; + gzdbg << "Source: " << sourceDir << std::endl; // Create a temp build directory std::string tmpBuildDir; ASSERT_TRUE(createAndSwitchToTempDir(tmpBuildDir)); EXPECT_TRUE(gz::common::exists(tmpBuildDir)); - igndbg << "Build directory: " << tmpBuildDir<< std::endl; + gzdbg << "Build directory: " << tmpBuildDir<< std::endl; char cmd[1024]; diff --git a/test/integration/Examples_TEST.cc b/test/integration/Examples_TEST.cc index 394ea21bf..92649a161 100644 --- a/test/integration/Examples_TEST.cc +++ b/test/integration/Examples_TEST.cc @@ -45,7 +45,7 @@ TEST(ExampleTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Configs)) gz::common::DirIter endIter; for (common::DirIter file(exampleConfigPath); file != endIter; ++file) { - igndbg << *file << std::endl; + gzdbg << *file << std::endl; Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); diff --git a/test/integration/marker_manager.cc b/test/integration/marker_manager.cc index c225d9b4e..c5deb3627 100644 --- a/test/integration/marker_manager.cc +++ b/test/integration/marker_manager.cc @@ -196,7 +196,7 @@ TEST_F(MarkerManagerTestFixture, bool executed = node.Request("/marker", markerMsg); if (executed) { - igndbg << "/marker request sent" << std::endl; + gzdbg << "/marker request sent" << std::endl; waitAndSendStatsMsgs(timePoint, 1, 200); EXPECT_EQ(1u, scene->VisualCount()); }