From 9a6fe47d17e671161999108a4e9c73b9594ebbc7 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 8 Mar 2024 20:19:06 +0100 Subject: [PATCH] Fix up text formatting as path's no longer get quoted --- .../ext/launcher/src/launcherwindow.cpp | 32 +++++----- .../launcher/src/profile/horizonsdialog.cpp | 20 +++--- apps/OpenSpace/ext/sgct | 2 +- apps/OpenSpace/main.cpp | 10 +-- ext/ghoul | 2 +- include/openspace/documentation/verifier.inl | 2 +- .../renderableinterpolatedpoints.cpp | 4 +- modules/base/rendering/renderablemodel.cpp | 20 +++--- modules/base/rendering/renderablenodeline.cpp | 14 ++--- .../rendering/renderableplaneimagelocal.cpp | 2 +- .../renderableplanetimevaryingimage.cpp | 4 +- .../rendering/renderablesphereimagelocal.cpp | 4 +- .../base/rendering/screenspaceimagelocal.cpp | 6 +- modules/cefwebgui/cefwebguimodule.cpp | 2 +- .../rendering/renderabledumeshes.cpp | 8 +-- .../rendering/renderableplanescloud.cpp | 2 +- modules/exoplanets/exoplanetshelper.cpp | 2 +- modules/exoplanets/exoplanetsmodule_lua.inl | 16 ++--- .../tasks/exoplanetsdatapreparationtask.cpp | 12 ++-- .../rendering/renderablefieldlines.cpp | 6 +- .../renderablefieldlinessequence.cpp | 13 ++-- .../util/fieldlinesstate.cpp | 2 +- .../util/kameleonfieldlinehelper.cpp | 6 +- modules/fitsfilereader/src/fitsfilereader.cpp | 4 +- modules/gaia/rendering/octreemanager.cpp | 2 +- .../gaia/rendering/renderablegaiastars.cpp | 8 ++- modules/gaia/tasks/constructoctreetask.cpp | 18 +++--- modules/gaia/tasks/readfitstask.cpp | 24 +++---- modules/gaia/tasks/readspecktask.cpp | 7 ++- modules/galaxy/rendering/renderablegalaxy.cpp | 12 ++-- modules/globebrowsing/globebrowsingmodule.cpp | 11 ++-- .../globebrowsing/globebrowsingmodule_lua.inl | 8 +-- modules/globebrowsing/src/gdalwrapper.cpp | 2 +- .../src/geojson/geojsoncomponent.cpp | 4 +- .../src/geojson/globegeometryfeature.cpp | 4 +- .../src/globelabelscomponent.cpp | 16 ++--- modules/globebrowsing/src/layermanager.cpp | 2 +- .../globebrowsing/src/rawtiledatareader.cpp | 12 ++-- modules/globebrowsing/src/renderableglobe.cpp | 2 +- modules/globebrowsing/src/ringscomponent.cpp | 12 ++-- .../sizereferencetileprovider.cpp | 2 +- .../src/tileprovider/temporaltileprovider.cpp | 4 +- modules/globebrowsing/src/timequantizer.cpp | 4 +- modules/imgui/imguimodule.cpp | 2 +- .../imgui/src/guiglobebrowsingcomponent.cpp | 2 +- modules/iswa/rendering/texturecygnet.cpp | 2 +- modules/iswa/util/iswamanager.cpp | 6 +- modules/iswa/util/iswamanager_lua.inl | 2 +- modules/kameleon/src/kameleonhelper.cpp | 6 +- modules/kameleon/src/kameleonwrapper.cpp | 8 ++- .../kameleonvolume/kameleonvolumereader.cpp | 5 +- .../tasks/kameleondocumentationtask.cpp | 2 +- .../tasks/kameleonmetadatatojsontask.cpp | 2 +- .../tasks/kameleonvolumetorawtask.cpp | 4 +- .../rendering/localerrorhistogrammanager.cpp | 4 +- .../rendering/renderablemultiresvolume.cpp | 26 ++++---- modules/server/src/connection.cpp | 4 +- .../src/topics/flightcontrollertopic.cpp | 14 ++--- modules/skybrowser/skybrowsermodule_lua.inl | 4 +- modules/skybrowser/src/browser.cpp | 2 +- modules/skybrowser/src/wwtdatahandler.cpp | 6 +- modules/space/horizonsfile.cpp | 2 +- modules/space/kepler.cpp | 4 +- .../renderableconstellationbounds.cpp | 2 +- .../renderableconstellationlines.cpp | 12 ++-- .../space/rendering/renderablefluxnodes.cpp | 9 +-- modules/space/rendering/renderablerings.cpp | 2 +- modules/space/rendering/renderablestars.cpp | 9 +-- modules/space/rotation/spicerotation.cpp | 1 - .../space/translation/horizonstranslation.cpp | 4 +- .../space/translation/spicetranslation.cpp | 15 ----- .../util/hongkangparser.cpp | 2 +- .../util/instrumenttimesparser.cpp | 4 +- .../util/labelparser.cpp | 8 +-- .../util/projectioncomponent.cpp | 6 +- modules/statemachine/src/statemachine.cpp | 2 +- .../statemachine/statemachinemodule_lua.inl | 13 ++-- modules/sync/syncs/httpsynchronization.cpp | 8 +-- modules/sync/syncs/urlsynchronization.cpp | 10 ++- modules/video/src/videoplayer.cpp | 10 +-- .../rendering/renderabledistancelabel.cpp | 2 +- modules/volume/rawvolumewriter.inl | 2 +- .../rendering/renderabletimevaryingvolume.cpp | 2 +- .../volume/tasks/generaterawvolumetask.cpp | 4 +- modules/webbrowser/src/browserinstance.cpp | 2 +- modules/webbrowser/webbrowsermodule.cpp | 2 +- src/data/csvloader.cpp | 8 +-- src/data/dataloader.cpp | 16 ++--- src/data/speckloader.cpp | 28 +++++---- src/engine/downloadmanager.cpp | 2 +- src/engine/openspaceengine.cpp | 30 ++++----- src/engine/openspaceengine_lua.inl | 8 +-- src/engine/settings.cpp | 2 +- src/events/eventengine.cpp | 2 +- src/interaction/joystickcamerastates.cpp | 6 +- src/interaction/sessionrecording.cpp | 62 +++++++++---------- .../tasks/convertrecfileversiontask.cpp | 4 +- .../tasks/convertrecformattask.cpp | 21 ++++--- src/navigation/navigationhandler.cpp | 2 +- src/navigation/orbitalnavigator.cpp | 4 +- src/network/parallelpeer.cpp | 3 +- src/properties/scalar/intproperty.cpp | 2 +- src/properties/scalar/uintproperty.cpp | 2 +- src/rendering/colormappingcomponent.cpp | 2 +- src/rendering/labelscomponent.cpp | 2 +- src/rendering/texturecomponent.cpp | 2 +- src/scene/asset.cpp | 12 ++-- src/scene/assetmanager.cpp | 12 ++-- src/scene/profile.cpp | 2 +- src/scene/profile_lua.inl | 9 ++- src/scene/scene.cpp | 8 +-- src/scene/scene_lua.inl | 22 +++---- src/scripting/scriptengine.cpp | 11 ++-- src/scripting/scriptengine_lua.inl | 4 +- src/util/httprequest.cpp | 12 ++-- src/util/openspacemodule.cpp | 2 +- src/util/spicemanager.cpp | 16 ++--- src/util/taskloader.cpp | 8 ++- support/coding/codegen | 2 +- 119 files changed, 457 insertions(+), 458 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 00a34e554f..65eb3b411c 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -118,7 +118,7 @@ namespace { parent, "Exception", QString::fromStdString(fmt::format( - "ParsingError exception in {}: {}, {}", + "ParsingError exception in '{}': {}, {}", filename, e.component, e.message )) ); @@ -129,7 +129,7 @@ namespace { parent, "Exception", QString::fromStdString(fmt::format( - "RuntimeError exception in {}, component {}: {}", + "RuntimeError exception in '{}', component {}: {}", filename, e.component, e.message )) ); @@ -154,7 +154,7 @@ namespace { parent, "Exception", QString::fromStdString(fmt::format( - "Error writing data to file: '{}' as file is marked hidden", + "Error writing data to file '{}' as file is marked hidden", path )) ); @@ -166,7 +166,7 @@ namespace { parent, "Exception", QString::fromStdString(fmt::format( - "Error writing data to file: {} ({})", path, e.what() + "Error writing data to file '{}': {}", path, e.what() )) ); } @@ -189,7 +189,7 @@ namespace { parent, "Exception", QString::fromStdString(fmt::format( - "Error writing data to file: {} ({})", path, e.what() + "Error writing data to file '{}': {}", path, e.what() )) ); } @@ -507,7 +507,7 @@ void LauncherWindow::populateProfilesList(std::string preset) { std::optional p = loadProfileFromFile(this, path.string()); int idx = _profileBox->count() - 1; if (p.has_value() && (*p).meta.has_value()) { - const std::optional& d = (*p).meta.value().description; + const std::optional& d = p->meta.value().description; if (d.has_value()) { // Tooltip has to be 'rich text' to linebreak properly QString tooltip = QString::fromStdString(fmt::format("

{}

", *d)); @@ -543,7 +543,7 @@ void LauncherWindow::populateProfilesList(std::string preset) { std::optional p = loadProfileFromFile(this, path.string()); int idx = _profileBox->count() - 1; if (p.has_value() && (*p).meta.has_value()) { - const std::optional& d = (*p).meta.value().description; + const std::optional& d = p->meta.value().description; if (d.has_value()) { // Tooltip has to be 'rich text' to linebreak properly QString tooltip = QString::fromStdString(fmt::format("

{}

", *d)); @@ -741,7 +741,8 @@ void LauncherWindow::onNewWindowConfigSelection(int newIndex) { _editWindowButton->setToolTip( QString::fromStdString(fmt::format( "Cannot edit '{}'\nsince it is one of the configuration " - "files provided in the OpenSpace installation", fileSelected)) + "files provided in the OpenSpace installation", fileSelected + )) ); } else { @@ -752,7 +753,8 @@ void LauncherWindow::onNewWindowConfigSelection(int newIndex) { _editWindowButton->setEnabled(false); _editWindowButton->setToolTip(QString::fromStdString(fmt::format( "This file does not meet the minimum required version of {}.", - versionMin.versionString()))); + versionMin.versionString() + ))); return; } } @@ -862,12 +864,10 @@ void LauncherWindow::openWindowEditor(const std::string& winCfg, bool isUserWinC } catch (const std::runtime_error& e) { //Re-throw an SGCT error exception with the runtime exception message - throw std::runtime_error( - fmt::format( - "Importing of this configuration file failed because of a " - "problem detected in the readConfig function:\n\n{}", e.what() - ) - ); + throw std::runtime_error(fmt::format( + "Importing of this configuration file failed because of a " + "problem detected in the readConfig function:\n\n{}", e.what() + )); } SgctEdit editor( preview, @@ -888,7 +888,7 @@ void LauncherWindow::openWindowEditor(const std::string& winCfg, bool isUserWinC editRefusalDialog( "File Format Version Error", fmt::format( - "File '{}' does not meet the minimum required version of {}.", + "File '{}' does not meet the minimum required version of {}", winCfg, versionMin.versionString() ), "" diff --git a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp index 92231cb143..9e5185bb89 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp @@ -504,7 +504,7 @@ json HorizonsDialog::handleReply(QNetworkReply* reply) { QVariant statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute); if (!checkHttpStatus(statusCode)) { std::string msg = fmt::format( - "Connection Error '{}' ", reply->errorString().toStdString() + "Connection Error '{}'", reply->errorString().toStdString() ); appendLog(msg, HorizonsDialog::LogLevel::Error); } @@ -666,8 +666,8 @@ std::pair HorizonsDialog::readTimeRange() { else { _errorMsg->setText("Could not parse time range"); std::string msg = fmt::format( - "Could not read time range '{}' to '{}'", timeRange.first, - timeRange.second + "Could not read time range '{}' to '{}'", + timeRange.first, timeRange.second ); appendLog(msg, LogLevel::Error); } @@ -740,7 +740,7 @@ bool HorizonsDialog::handleRequest() { std::filesystem::rename(oldFile, newFile); std::string msg = fmt::format( - "For more information, see the saved error file {}", newFile + "For more information, see the saved error file '{}'", newFile ); appendLog(msg, LogLevel::Info); } @@ -865,7 +865,7 @@ openspace::HorizonsFile HorizonsDialog::handleAnswer(json& answer) { auto result = answer.find("result"); if (result == answer.end()) { - std::string msg = fmt::format("Malformed answer recieved '{}'", answer.dump()); + std::string msg = fmt::format("Malformed answer received '{}'", answer.dump()); appendLog(msg, HorizonsDialog::LogLevel::Error); return openspace::HorizonsFile(); } @@ -969,8 +969,8 @@ bool HorizonsDialog::handleResult(openspace::HorizonsResultCode& result) { } msg = fmt::format( - "Valid time range is '{}' to '{}'", _validTimeRange.first, - _validTimeRange.second + "Valid time range is '{}' to '{}'", + _validTimeRange.first, _validTimeRange.second ); appendLog(msg, HorizonsDialog::LogLevel::Info); _importTimeButton->show(); @@ -1020,7 +1020,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsResultCode& result) { } case HorizonsResultCode::MultipleObserverStations: { std::string msg = fmt::format( - "Multiple matching observer stations were found for observer '{}'. ", + "Multiple matching observer stations were found for observer '{}'", _observerName ); appendLog(msg, HorizonsDialog::LogLevel::Warning); @@ -1076,9 +1076,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsResultCode& result) { HorizonsDialog::LogLevel::Error ); if (!_latestHorizonsError.empty()) { - msg = fmt::format( - "Latest Horizons error: {}", _latestHorizonsError - ); + msg = fmt::format("Latest Horizons error: {}", _latestHorizonsError); appendLog(msg, LogLevel::Error); } break; diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 62333a4bc2..4bf071f548 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 62333a4bc252e6192f062e6aa80e50a3db2e744e +Subproject commit 4bf071f5486dee3bb6ae95d8a90e9ee6f8ef2a18 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 146ca7f30f..f6f47ac0b3 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -1077,7 +1077,7 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC } else { throw ghoul::RuntimeError(fmt::format( - "Error loading configuration file {}. File could not be found", + "Error loading configuration file '{}'. File could not be found", config )); } @@ -1129,7 +1129,7 @@ int main(int argc, char* argv[]) { std::filesystem::current_path() / std::filesystem::path(argv[0]).parent_path(), ghoul::filesystem::FileSystem::Override::Yes ); - LDEBUG(fmt::format("Registering ${{BIN}} to {}", absPath("${BIN}"))); + LDEBUG(fmt::format("Registering ${{BIN}} to '{}'", absPath("${BIN}"))); // // Parse commandline arguments @@ -1213,11 +1213,11 @@ int main(int argc, char* argv[]) { if (!std::filesystem::is_regular_file(configurationFilePath)) { LFATALC( "main", - fmt::format("Could not find configuration {}", configurationFilePath) + fmt::format("Could not find configuration '{}'", configurationFilePath) ); exit(EXIT_FAILURE); } - LINFO(fmt::format("Configuration Path: {}", configurationFilePath)); + LINFO(fmt::format("Configuration Path '{}'", configurationFilePath)); // Register the base path as the directory where the configuration file lives std::filesystem::path base = configurationFilePath.parent_path(); @@ -1339,7 +1339,7 @@ int main(int argc, char* argv[]) { "OpenSpace", QString::fromStdString(fmt::format( "The OpenSpace folder is started must not contain any of \"'\", " - "\"\"\", [, or ]. Path is: '{}'. Unexpected errors will occur when " + "\"\"\", [, or ]. Path is: {}. Unexpected errors will occur when " "proceeding to run the software", pwd )) ); diff --git a/ext/ghoul b/ext/ghoul index 8a502be36b..2c78aec544 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 8a502be36b93385ab902e27f4d50d1fb5e90b5a0 +Subproject commit 2c78aec544b741a3de420ee6f99b72b04e7f9061 diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl index 2e10417050..8ed86be2b3 100644 --- a/include/openspace/documentation/verifier.inl +++ b/include/openspace/documentation/verifier.inl @@ -384,7 +384,7 @@ TestResult InListVerifier::operator()(const ghoul::Dictionary& dict, } ); o.explanation = fmt::format( - "{} not in list of accepted values '{}'", + "'{}' not in list of accepted values '{}'", key, list ); r.offenses.push_back(o); diff --git a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp index 66ed112948..81faf785fe 100644 --- a/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp +++ b/modules/base/rendering/pointcloud/renderableinterpolatedpoints.cpp @@ -273,8 +273,8 @@ RenderableInterpolatedPoints::RenderableInterpolatedPoints( if (_nDataPoints % nObjects != 0) { LERROR(fmt::format( "Mismatch between provided number of data entries and the specified number " - "of points. Expected the number of entries in the data file {} to be evenly " - "divisible by the number of points", _dataFile + "of points. Expected the number of entries in the data file '{}' to be " + "evenly divisible by the number of points", _dataFile )); } diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index 141361da84..36c7f57550 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -363,7 +363,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _file = absPath(p.geometryFile.string()); if (!std::filesystem::exists(_file)) { - throw ghoul::RuntimeError(fmt::format("Cannot find model file {}", _file)); + throw ghoul::RuntimeError(fmt::format("Cannot find model file '{}'", _file)); } _invertModelScale = p.invertModelScale.value_or(_invertModelScale); @@ -475,7 +475,9 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _modelScale.onChange([this]() { if (!_geometry) { - LWARNING(fmt::format("Cannot set scale for model {}; not loaded yet", _file)); + LWARNING(fmt::format( + "Cannot set scale for model '{}': not loaded yet", _file + )); return; } @@ -492,12 +494,12 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) _enableAnimation.onChange([this]() { if (!_modelHasAnimation) { LWARNING(fmt::format( - "Cannot enable animation for model {}; it does not have any", _file + "Cannot enable animation for model '{}': it does not have any", _file )); } else if (_enableAnimation && _animationStart.empty()) { LWARNING(fmt::format( - "Cannot enable animation for model {}; it does not have a start time", + "Cannot enable animation for model '{}': it does not have a start time", _file )); _enableAnimation = false; @@ -505,7 +507,7 @@ RenderableModel::RenderableModel(const ghoul::Dictionary& dictionary) else { if (!_geometry) { LWARNING(fmt::format( - "Cannot enable animation for model {}; not loaded yet", _file + "Cannot enable animation for model '{}': not loaded yet", _file )); return; } @@ -565,13 +567,13 @@ void RenderableModel::initializeGL() { if (!_modelHasAnimation) { if (!_animationStart.empty()) { LWARNING(fmt::format( - "Animation start time given to model {} without animation", _file + "Animation start time given to model '{}' without animation", _file )); } if (_enableAnimation) { LWARNING(fmt::format( - "Cannot enable animation for model {}; it does not have any", _file + "Cannot enable animation for model '{}': it does not have any", _file )); _enableAnimation = false; } @@ -581,13 +583,13 @@ void RenderableModel::initializeGL() { else { if (_enableAnimation && _animationStart.empty()) { LWARNING(fmt::format( - "Cannot enable animation for model {}; it does not have a start time", + "Cannot enable animation for model '{}': it does not have a start time", _file )); } else if (!_enableAnimation) { LINFO(fmt::format( - "Model {} with deactivated animation was found. The animation can be " + "Model '{}' with deactivated animation was found. The animation can be " "activated by entering a start time in the asset file", _file )); } diff --git a/modules/base/rendering/renderablenodeline.cpp b/modules/base/rendering/renderablenodeline.cpp index 68f6ebc97d..d1a60cb457 100644 --- a/modules/base/rendering/renderablenodeline.cpp +++ b/modules/base/rendering/renderablenodeline.cpp @@ -182,10 +182,9 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) return; } LWARNING(fmt::format( - "Setting StartOffset for node line '{}': " - "Trying to use relative offsets for start node '{}' that has no " - "bounding sphere. This will result in no offset. Use direct " - "values by setting UseRelativeOffsets to false", + "Setting StartOffset for node line '{}': Trying to use relative offsets " + "for start node '{}' that has no bounding sphere. This will result in no " + "offset. Use direct values by setting UseRelativeOffsets to false", parent()->identifier(), _start.value() )); } @@ -200,10 +199,9 @@ RenderableNodeLine::RenderableNodeLine(const ghoul::Dictionary& dictionary) return; } LWARNING(fmt::format( - "Setting EndOffset for node line '{}': " - "Trying to use relative offsets for end node '{}' that has no " - "bounding sphere. This will result in no offset. Use direct " - "values by setting UseRelativeOffsets to false", + "Setting EndOffset for node line '{}': Trying to use relative offsets " + "for end node '{}' that has no bounding sphere. This will result in no " + "offset. Use direct values by setting UseRelativeOffsets to false", parent()->identifier(), _end.value() )); } diff --git a/modules/base/rendering/renderableplaneimagelocal.cpp b/modules/base/rendering/renderableplaneimagelocal.cpp index 6114da3d5d..0d0aea11f6 100644 --- a/modules/base/rendering/renderableplaneimagelocal.cpp +++ b/modules/base/rendering/renderableplaneimagelocal.cpp @@ -175,7 +175,7 @@ void RenderablePlaneImageLocal::loadTexture() { LDEBUGC( "RenderablePlaneImageLocal", - fmt::format("Loaded texture from {}", absPath(path)) + fmt::format("Loaded texture from '{}'", absPath(path)) ); texture->uploadTexture(); texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap); diff --git a/modules/base/rendering/renderableplanetimevaryingimage.cpp b/modules/base/rendering/renderableplanetimevaryingimage.cpp index 156ab6aae5..c33071fce0 100644 --- a/modules/base/rendering/renderableplanetimevaryingimage.cpp +++ b/modules/base/rendering/renderableplanetimevaryingimage.cpp @@ -97,7 +97,7 @@ RenderablePlaneTimeVaryingImage::RenderablePlaneTimeVaryingImage( _sourceFolder = p.sourceFolder; if (!std::filesystem::is_directory(absPath(_sourceFolder))) { LERROR(fmt::format( - "Time varying image, {} is not a valid directory", + "Time varying image, '{}' is not a valid directory", _sourceFolder.value() )); } @@ -175,7 +175,7 @@ bool RenderablePlaneTimeVaryingImage::extractMandatoryInfoFromDictionary() { // Ensure that there are available and valid source files left if (_sourceFiles.empty()) { LERROR(fmt::format( - "{}: Plane sequence filepath {} was empty", + "{}: Plane sequence filepath '{}' was empty", _identifier, _sourceFolder.value() )); return false; diff --git a/modules/base/rendering/renderablesphereimagelocal.cpp b/modules/base/rendering/renderablesphereimagelocal.cpp index 92b9441935..e68de2767a 100644 --- a/modules/base/rendering/renderablesphereimagelocal.cpp +++ b/modules/base/rendering/renderablesphereimagelocal.cpp @@ -117,14 +117,14 @@ void RenderableSphereImageLocal::loadTexture() { if (!texture) { LWARNINGC( "RenderableSphereImageLocal", - fmt::format("Could not load texture from {}", absPath(_texturePath)) + fmt::format("Could not load texture from '{}'", absPath(_texturePath)) ); return; } LDEBUGC( "RenderableSphereImageLocal", - fmt::format("Loaded texture from {}", absPath(_texturePath)) + fmt::format("Loaded texture from '{}'", absPath(_texturePath)) ); texture->uploadTexture(); texture->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap); diff --git a/modules/base/rendering/screenspaceimagelocal.cpp b/modules/base/rendering/screenspaceimagelocal.cpp index bda85bc416..e9e361ece7 100644 --- a/modules/base/rendering/screenspaceimagelocal.cpp +++ b/modules/base/rendering/screenspaceimagelocal.cpp @@ -86,7 +86,7 @@ ScreenSpaceImageLocal::ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary LWARNINGC( "ScreenSpaceImageLocal", fmt::format( - "Image {} did not exist for {}", _texturePath.value(), _identifier + "Image '{}' did not exist for '{}'", _texturePath.value(), _identifier ) ); } @@ -103,7 +103,9 @@ ScreenSpaceImageLocal::ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary else { LWARNINGC( "ScreenSpaceImageLocal", - fmt::format("Image {} did not exist for {}", *p.texturePath, _identifier) + fmt::format( + "Image '{}' did not exist for '{}'", *p.texturePath, _identifier + ) ); } } diff --git a/modules/cefwebgui/cefwebguimodule.cpp b/modules/cefwebgui/cefwebguimodule.cpp index 3aab3b311f..c40b798489 100644 --- a/modules/cefwebgui/cefwebguimodule.cpp +++ b/modules/cefwebgui/cefwebguimodule.cpp @@ -102,7 +102,7 @@ void CefWebGuiModule::startOrStopGui() { const bool isMaster = global::windowDelegate->isMaster(); if (_enabled && isMaster) { - LDEBUGC("WebBrowser", fmt::format("Loading GUI from {}", _url.value())); + LDEBUGC("WebBrowser", fmt::format("Loading GUI from '{}'", _url.value())); if (!_instance) { _instance = std::make_unique( diff --git a/modules/digitaluniverse/rendering/renderabledumeshes.cpp b/modules/digitaluniverse/rendering/renderabledumeshes.cpp index dd4bd817aa..94ac450298 100644 --- a/modules/digitaluniverse/rendering/renderabledumeshes.cpp +++ b/modules/digitaluniverse/rendering/renderabledumeshes.cpp @@ -448,7 +448,7 @@ void RenderableDUMeshes::update(const UpdateData&) { bool RenderableDUMeshes::loadData() { bool success = false; if (_hasSpeckFile) { - LINFO(fmt::format("Loading Speck file {}", std::filesystem::path(_speckFile))); + LINFO(fmt::format("Loading Speck file '{}'", _speckFile)); success = readSpeckFile(); if (!success) { return false; @@ -466,9 +466,7 @@ bool RenderableDUMeshes::loadData() { bool RenderableDUMeshes::readSpeckFile() { std::ifstream file(_speckFile); if (!file.good()) { - LERROR(fmt::format( - "Failed to open Speck file {}", std::filesystem::path(_speckFile) - )); + LERROR(fmt::format("Failed to open Speck file '{}'", _speckFile)); return false; } @@ -579,7 +577,7 @@ bool RenderableDUMeshes::readSpeckFile() { if (!success) { LERROR(fmt::format( - "Failed reading position on line {} of mesh {} in file: '{}'. " + "Failed reading position on line {} of mesh {} in file '{}'. " "Stopped reading mesh data", l, meshIndex, _speckFile )); break; diff --git a/modules/digitaluniverse/rendering/renderableplanescloud.cpp b/modules/digitaluniverse/rendering/renderableplanescloud.cpp index 4ab564e3ea..fb5006e7fa 100644 --- a/modules/digitaluniverse/rendering/renderableplanescloud.cpp +++ b/modules/digitaluniverse/rendering/renderableplanescloud.cpp @@ -516,7 +516,7 @@ void RenderablePlanesCloud::loadTextures() { ghoul::io::TextureReader::ref().loadTexture(path.string(), 2); if (t) { - LINFOC("RenderablePlanesCloud", fmt::format("Loaded texture {}", path)); + LINFOC("RenderablePlanesCloud", fmt::format("Loaded texture '{}'", path)); t->uploadTexture(); t->setFilter(ghoul::opengl::Texture::FilterMode::LinearMipMap); t->purgeFromRAM(); diff --git a/modules/exoplanets/exoplanetshelper.cpp b/modules/exoplanets/exoplanetshelper.cpp index 130e1581e4..75b9ad87b1 100644 --- a/modules/exoplanets/exoplanetshelper.cpp +++ b/modules/exoplanets/exoplanetshelper.cpp @@ -65,7 +65,7 @@ glm::vec3 computeStarColor(float bv) { if (!colorMap.good()) { LERROR(fmt::format( - "Failed to open colormap data file: {}", absPath(bvColormapPath) + "Failed to open colormap data file '{}'", absPath(bvColormapPath) )); return glm::vec3(0.f); } diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index 4adc13639d..5ea8a5874e 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -53,14 +53,14 @@ openspace::exoplanets::ExoplanetSystem findExoplanetSystemInData( const std::string binPath = module->exoplanetsDataPath(); std::ifstream data(absPath(binPath), std::ios::in | std::ios::binary); if (!data.good()) { - LERROR(fmt::format("Failed to open exoplanets data file: '{}'", binPath)); + LERROR(fmt::format("Failed to open exoplanets data file '{}'", binPath)); return ExoplanetSystem(); } const std::string lutPath = module->lookUpTablePath(); std::ifstream lut(absPath(lutPath)); if (!lut.good()) { - LERROR(fmt::format("Failed to open exoplanets look-up table: '{}'", lutPath)); + LERROR(fmt::format("Failed to open exoplanets look-up table '{}'", lutPath)); return ExoplanetSystem(); } @@ -90,7 +90,7 @@ openspace::exoplanets::ExoplanetSystem findExoplanetSystemInData( sanitizeNameString(name); if (!hasSufficientData(p)) { - LWARNING(fmt::format("Insufficient data for exoplanet: '{}'", name)); + LWARNING(fmt::format("Insufficient data for exoplanet '{}'", name)); continue; } @@ -129,7 +129,7 @@ void createExoplanetSystem(const std::string& starName, const glm::vec3 starPosInParsec = system.starData.position; if (!isValidPosition(starPosInParsec)) { LERROR(fmt::format( - "Insufficient data available for exoplanet system: '{}'. Could not determine " + "Insufficient data available for exoplanet system '{}'. Could not determine " "star position", starName )); return; @@ -723,7 +723,7 @@ listOfExoplanetsDeprecated() std::ifstream inputDataFile(csvFile); if (!inputDataFile.good()) { - LERROR(fmt::format("Failed to open input file {}", csvFile)); + LERROR(fmt::format("Failed to open input file '{}'", csvFile)); return; } @@ -745,11 +745,11 @@ listOfExoplanetsDeprecated() module->teffToBvConversionFilePath() ); - LINFO(fmt::format("Reading data for planet: '{}' ", planetData.name)); + LINFO(fmt::format("Reading data for planet '{}'", planetData.name)); if (!hasSufficientData(planetData.dataEntry)) { LWARNING(fmt::format( - "Insufficient data for exoplanet: '{}'", planetData.name + "Insufficient data for exoplanet '{}'", planetData.name )); continue; } @@ -785,7 +785,7 @@ listOfExoplanetsDeprecated() } LINFO(fmt::format( - "Read data for {} exoplanet systems from CSV file: '{}'. Please wait until " + "Read data for {} exoplanet systems from CSV file: {}. Please wait until " "they are all finished initializing. You may have to reload the user interface.", hostNameToSystemDataMap.size(), csvFile )); diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 746b422d91..9508df954d 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -101,7 +101,7 @@ ExoplanetsDataPreparationTask::ExoplanetsDataPreparationTask( std::string ExoplanetsDataPreparationTask::description() { return fmt::format( - "Extract data about exoplanets from file {} and write as bin to {}. The data " + "Extract data about exoplanets from file '{}' and write as bin to '{}'. The data " "file should be a csv version of the Planetary Systems Composite Data from the " "NASA exoplanets archive (https://exoplanetarchive.ipac.caltech.edu/)", _inputDataPath, _outputBinPath @@ -113,7 +113,7 @@ void ExoplanetsDataPreparationTask::perform( { std::ifstream inputDataFile(_inputDataPath); if (!inputDataFile.good()) { - LERROR(fmt::format("Failed to open input file {}", _inputDataPath)); + LERROR(fmt::format("Failed to open input file '{}'", _inputDataPath)); return; } @@ -121,7 +121,7 @@ void ExoplanetsDataPreparationTask::perform( std::ofstream lutFile(_outputLutPath); if (!binFile.good()) { - LERROR(fmt::format("Error when writing to {}",_outputBinPath)); + LERROR(fmt::format("Error when writing to '{}'",_outputBinPath)); if (!std::filesystem::is_directory(_outputBinPath.parent_path())) { LERROR("Output directory does not exist"); } @@ -129,7 +129,7 @@ void ExoplanetsDataPreparationTask::perform( } if (!lutFile.good()) { - LERROR(fmt::format("Error when writing to {}", _outputLutPath)); + LERROR(fmt::format("Error when writing to '{}'", _outputLutPath)); if (!std::filesystem::is_directory(_outputLutPath.parent_path())) { LERROR("Output directory does not exist"); } @@ -453,7 +453,7 @@ glm::vec3 ExoplanetsDataPreparationTask::starPosition(const std::string& starNam std::ifstream exoplanetsFile(sourceFile); if (!exoplanetsFile) { - LERROR(fmt::format("Error opening file {}", sourceFile)); + LERROR(fmt::format("Error opening file '{}'", sourceFile)); } std::string line; @@ -499,7 +499,7 @@ float ExoplanetsDataPreparationTask::bvFromTeff(float teff, std::ifstream teffToBvFile(conversionFile); if (!teffToBvFile.good()) { - LERROR(fmt::format("Failed to open file {}", conversionFile)); + LERROR(fmt::format("Failed to open file '{}'", conversionFile)); return std::numeric_limits::quiet_NaN(); } diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 295121b017..7f616485b4 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -405,7 +405,7 @@ void RenderableFieldlines::loadSeedPointsFromTable() { std::vector RenderableFieldlines::generateFieldlines() { if (!_vectorFieldInfo.hasValue(KeyVectorFieldType)) { LERROR(fmt::format( - "{} does not contain a '{}' key", KeyVectorField, KeyVectorFieldType + "'{}' does not contain a '{}' key", KeyVectorField, KeyVectorFieldType )); return {}; } @@ -426,14 +426,14 @@ std::vector RenderableFieldlines::generateFieldlinesVolumeKameleon() { if (!_vectorFieldInfo.hasValue(KeyVectorFieldVolumeModel)) { - LERROR(fmt::format("{} does not name a model", KeyVectorField)); + LERROR(fmt::format("'{}' does not name a model", KeyVectorField)); return {}; } std::string model = _vectorFieldInfo.value(KeyVectorFieldVolumeModel); if (!_vectorFieldInfo.hasValue(KeyVectorFieldFile)) { - LERROR(fmt::format("{} does not name a file", KeyVectorField)); + LERROR(fmt::format("'{}' does not name a file", KeyVectorField)); return {}; } std::string fileName = _vectorFieldInfo.value(KeyVectorFieldFile); diff --git a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp index 7a7b2ba9ac..69d5652e8b 100644 --- a/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp +++ b/modules/fieldlinessequence/rendering/renderablefieldlinessequence.cpp @@ -389,8 +389,7 @@ RenderableFieldlinesSequence::RenderableFieldlinesSequence( std::filesystem::path sourcePath = p.sourceFolder; if (!std::filesystem::is_directory(sourcePath)) { LERROR(fmt::format( - "FieldlinesSequence {} is not a valid directory", - sourcePath.string() + "FieldlinesSequence '{}' is not a valid directory", sourcePath )); } @@ -422,7 +421,7 @@ RenderableFieldlinesSequence::RenderableFieldlinesSequence( // Ensure that there are available and valid source files left if (_sourceFiles.empty()) { LERROR(fmt::format( - "{} contains no {} files", sourcePath.string(), fileTypeString + "'{}' contains no {} files", sourcePath.string(), fileTypeString )); } _extraVars = p.extraVariables.value_or(_extraVars); @@ -492,7 +491,7 @@ RenderableFieldlinesSequence::RenderableFieldlinesSequence( if (!_outputFolderPath.empty() && !std::filesystem::is_directory(_outputFolderPath)) { _outputFolderPath.clear(); LERROR(fmt::format( - "The specified output path: '{}', does not exist", _outputFolderPath + "The specified output path '{}' does not exist", _outputFolderPath )); } @@ -618,7 +617,7 @@ void RenderableFieldlinesSequence::loadOsflsStatesIntoRAM() { } } else { - LWARNING(fmt::format("Failed to load state from: {}", filePath)); + LWARNING(fmt::format("Failed to load state from '{}'", filePath)); } } } @@ -853,7 +852,7 @@ std::unordered_map> if (!std::filesystem::is_directory(filePath)) { LERROR(fmt::format( - "The specified seed point directory: '{}' does not exist", filePath + "The specified seed point directory '{}' does not exist", filePath )); return outMap; } @@ -887,7 +886,7 @@ std::unordered_map> } if (outVec.empty()) { - LERROR(fmt::format("Found no seed points in: {}", seedFilePath)); + LERROR(fmt::format("Found no seed points in '{}'", seedFilePath)); outMap.clear(); return {}; } diff --git a/modules/fieldlinessequence/util/fieldlinesstate.cpp b/modules/fieldlinessequence/util/fieldlinesstate.cpp index 3f07ccbd05..571088c3c7 100644 --- a/modules/fieldlinessequence/util/fieldlinesstate.cpp +++ b/modules/fieldlinessequence/util/fieldlinesstate.cpp @@ -140,7 +140,7 @@ bool FieldlinesState::loadStateFromJson(const std::string& pathToJsonFile, std::ifstream ifs(pathToJsonFile); if (!ifs.is_open()) { - LERROR(fmt::format("FAILED TO OPEN FILE: {}", pathToJsonFile)); + LERROR(fmt::format("Failed to open file '{}'", pathToJsonFile)); return false; } diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp index abaf4a3431..266fa2a554 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp @@ -311,7 +311,7 @@ void prepareStateAndKameleonForExtras(ccmc::Kameleon* kameleon, str = TAsPOverRho; } if (!success) { - LWARNING(fmt::format("Failed to load extra variable: '{}'. Ignoring", str)); + LWARNING(fmt::format("Failed to load extra variable '{}'. Ignoring", str)); extraScalarVars.erase(extraScalarVars.begin() + i); --i; } @@ -350,8 +350,8 @@ void prepareStateAndKameleonForExtras(ccmc::Kameleon* kameleon, } if (!success) { LWARNING(fmt::format( - "Failed to load at least one of the magnitude variables: {}, {}, {}. " - "Removing ability to store corresponding magnitude", + "Failed to load at least one of the magnitude variables: '{}', '{}', " + "'{}'. Removing ability to store corresponding magnitude", s1, s2, s3 )); extraMagVars.erase( diff --git a/modules/fitsfilereader/src/fitsfilereader.cpp b/modules/fitsfilereader/src/fitsfilereader.cpp index 0b74ec0497..e11aecfb65 100644 --- a/modules/fitsfilereader/src/fitsfilereader.cpp +++ b/modules/fitsfilereader/src/fitsfilereader.cpp @@ -247,7 +247,7 @@ std::vector FitsFileReader::readFitsFile(std::filesystem::path filePath, ); if (!table) { - throw ghoul::RuntimeError(fmt::format("Failed to open Fits file {}", filePath)); + throw ghoul::RuntimeError(fmt::format("Failed to open Fits file '{}'", filePath)); } int nStars = table->readRows - firstRow + 1; @@ -530,7 +530,7 @@ std::vector FitsFileReader::readSpeckFile(const std::filesystem::path& fi std::ifstream fileStream(filePath); if (!fileStream.good()) { - LERROR(fmt::format("Failed to open Speck file {}", filePath)); + LERROR(fmt::format("Failed to open Speck file '{}'", filePath)); return fullData; } diff --git a/modules/gaia/rendering/octreemanager.cpp b/modules/gaia/rendering/octreemanager.cpp index 48e15fbba0..0599a724a2 100644 --- a/modules/gaia/rendering/octreemanager.cpp +++ b/modules/gaia/rendering/octreemanager.cpp @@ -723,7 +723,7 @@ void OctreeManager::writeNodeToMultipleFiles(const std::string& outFilePrefix, outFileStream.close(); } else { - LERROR(fmt::format("Error opening file: {} as output data file", outPath)); + LERROR(fmt::format("Error opening file '{}' as output data file", outPath)); } } diff --git a/modules/gaia/rendering/renderablegaiastars.cpp b/modules/gaia/rendering/renderablegaiastars.cpp index c32593c0bd..632f4a5eaa 100644 --- a/modules/gaia/rendering/renderablegaiastars.cpp +++ b/modules/gaia/rendering/renderablegaiastars.cpp @@ -2102,7 +2102,7 @@ void RenderableGaiaStars::update(const UpdateData&) { if (_pointSpreadFunctionTexture) { LDEBUG(fmt::format( - "Loaded texture from {}", absPath(_pointSpreadFunctionTexturePath) + "Loaded texture from '{}'", absPath(_pointSpreadFunctionTexturePath) )); _pointSpreadFunctionTexture->uploadTexture(); } @@ -2129,7 +2129,9 @@ void RenderableGaiaStars::update(const UpdateData&) { 1 ); if (_colorTexture) { - LDEBUG(fmt::format("Loaded texture from {}", absPath(_colorTexturePath))); + LDEBUG(fmt::format( + "Loaded texture from '{}'", absPath(_colorTexturePath) + )); _colorTexture->uploadTexture(); } @@ -2186,7 +2188,7 @@ bool RenderableGaiaStars::readDataFile() { _octreeManager.initOctree(_cpuRamBudgetInBytes); std::filesystem::path file = absPath(_filePath.value()); - LINFO(fmt::format("Loading data file: {}", file)); + LINFO(fmt::format("Loading data file '{}'", file)); switch (fileReaderOption) { case gaia::FileReaderOption::Fits: diff --git a/modules/gaia/tasks/constructoctreetask.cpp b/modules/gaia/tasks/constructoctreetask.cpp index ea459006d2..9681bf6fcf 100644 --- a/modules/gaia/tasks/constructoctreetask.cpp +++ b/modules/gaia/tasks/constructoctreetask.cpp @@ -296,8 +296,8 @@ ConstructOctreeTask::ConstructOctreeTask(const ghoul::Dictionary& dictionary) { std::string ConstructOctreeTask::description() { return fmt::format( - "Read bin file (or files in folder): {} and write octree data file (or files) " - "into: {}", _inFileOrFolderPath, _outFileOrFolderPath + "Read bin file (or files in folder) '{}' and write octree data file (or files) " + "into '{}'", _inFileOrFolderPath, _outFileOrFolderPath ); } @@ -325,7 +325,7 @@ void ConstructOctreeTask::constructOctreeFromSingleFile( _octreeManager->initOctree(0, _maxDist, _maxStarsPerNode); - LINFO(fmt::format("Reading data file: {}", _inFileOrFolderPath)); + LINFO(fmt::format("Reading data file '{}'", _inFileOrFolderPath)); LINFO(fmt::format( "MAX DIST: {} - MAX STARS PER NODE: {}", @@ -406,7 +406,7 @@ void ConstructOctreeTask::constructOctreeFromSingleFile( } else { LERROR(fmt::format( - "Error opening file {} for loading preprocessed file", _inFileOrFolderPath + "Error opening file '{}' for loading preprocessed file", _inFileOrFolderPath )); } LINFO(fmt::format("{} of {} read stars were filtered", nFilteredStars, nTotalStars)); @@ -414,7 +414,7 @@ void ConstructOctreeTask::constructOctreeFromSingleFile( // Slice LOD data before writing to files. _octreeManager->sliceLodData(); - LINFO(fmt::format("Writing octree to: {}", _outFileOrFolderPath)); + LINFO(fmt::format("Writing octree to '{}'", _outFileOrFolderPath)); std::ofstream outFileStream(_outFileOrFolderPath, std::ofstream::binary); if (outFileStream.good()) { if (nValues == 0) { @@ -426,7 +426,7 @@ void ConstructOctreeTask::constructOctreeFromSingleFile( } else { LERROR(fmt::format( - "Error opening file: {} as output data file", _outFileOrFolderPath + "Error opening file '{}' as output data file", _outFileOrFolderPath )); } } @@ -479,7 +479,7 @@ void ConstructOctreeTask::constructOctreeFromFolder( std::filesystem::path inFilePath = allInputFiles[idx]; int nStarsInfile = 0; - LINFO(fmt::format("Reading data file: {}", inFilePath)); + LINFO(fmt::format("Reading data file '{}'", inFilePath)); std::ifstream inFileStream(inFilePath, std::ifstream::binary); if (inFileStream.good()) { @@ -537,7 +537,7 @@ void ConstructOctreeTask::constructOctreeFromFolder( } else { LERROR(fmt::format( - "Error opening file {} for loading preprocessed file", inFilePath + "Error opening file '{}' for loading preprocessed file", inFilePath )); } @@ -603,7 +603,7 @@ void ConstructOctreeTask::constructOctreeFromFolder( } else { LERROR(fmt::format( - "Error opening file: {} as index output file", indexFileOutPath + "Error opening file '{}' as index output file", indexFileOutPath )); } diff --git a/modules/gaia/tasks/readfitstask.cpp b/modules/gaia/tasks/readfitstask.cpp index d7d9d05adf..5d67fd2dfc 100644 --- a/modules/gaia/tasks/readfitstask.cpp +++ b/modules/gaia/tasks/readfitstask.cpp @@ -106,10 +106,10 @@ ReadFitsTask::ReadFitsTask(const ghoul::Dictionary& dictionary) { std::string ReadFitsTask::description() { return fmt::format( - "Read the specified fits file (or all fits files in specified folder): {}\n and " - "write raw star data into: {}\nAll columns required for default rendering and " - "filtering parameters will always be read but user can define additional filter " - "columns to read", _inFileOrFolderPath, _outFileOrFolderPath + "Read the specified fits file (or all fits files in specified folder): '{}'\n " + "and write raw star data into: '{}'\nAll columns required for default rendering " + "and filtering parameters will always be read but user can define additional " + "filter columns to read", _inFileOrFolderPath, _outFileOrFolderPath ); } @@ -143,7 +143,9 @@ void ReadFitsTask::readSingleFitsFile(const Task::ProgressCallback& progressCall std::ofstream outFileStream(_outFileOrFolderPath, std::ofstream::binary); if (outFileStream.good()) { int32_t nValues = static_cast(fullData.size()); - LINFO(fmt::format("Writing {} values to file {}", nValues, _outFileOrFolderPath)); + LINFO(fmt::format( + "Writing {} values to file '{}'", nValues, _outFileOrFolderPath + )); LINFO("Number of values per star: " + std::to_string(nValuesPerStar)); if (nValues == 0) { @@ -165,7 +167,7 @@ void ReadFitsTask::readSingleFitsFile(const Task::ProgressCallback& progressCall } else { LERROR(fmt::format( - "Error opening file: {} as output data file", _outFileOrFolderPath + "Error opening file '{}' as output data file", _outFileOrFolderPath )); } } @@ -301,20 +303,18 @@ void ReadFitsTask::readAllFitsFilesFromFolder(const Task::ProgressCallback&) { int ReadFitsTask::writeOctantToFile(const std::vector& octantData, int index, std::vector& isFirstWrite, int nValuesPerStar) { - std::string outPath = fmt::format( - "{}octant_{}.bin", _outFileOrFolderPath.string(), index - ); + std::string outPath = fmt::format("{}octant_{}.bin", _outFileOrFolderPath, index); std::ofstream fileStream(outPath, std::ofstream::binary | std::ofstream::app); if (fileStream.good()) { int32_t nValues = static_cast(octantData.size()); - LINFO("Write " + std::to_string(nValues) + " values to " + outPath); + LINFO(fmt::format("Write {} values to {}", nValues, outPath)); if (nValues == 0) { LERROR("Error writing file - No values were read from file"); } // If this is the first write then write number of values per star! if (isFirstWrite[index]) { - LINFO("First write for Octant_" + std::to_string(index)); + LINFO(fmt::format("First write for Octant_{}", index)); fileStream.write( reinterpret_cast(&nValuesPerStar), sizeof(int32_t) @@ -331,7 +331,7 @@ int ReadFitsTask::writeOctantToFile(const std::vector& octantData, int in return nValues / nValuesPerStar; } else { - LERROR(fmt::format("Error opening file: {} as output data file", outPath)); + LERROR(fmt::format("Error opening file '{}' as output data file", outPath)); return 0; } } diff --git a/modules/gaia/tasks/readspecktask.cpp b/modules/gaia/tasks/readspecktask.cpp index 228730e21c..811614905a 100644 --- a/modules/gaia/tasks/readspecktask.cpp +++ b/modules/gaia/tasks/readspecktask.cpp @@ -60,7 +60,8 @@ ReadSpeckTask::ReadSpeckTask(const ghoul::Dictionary& dictionary) { std::string ReadSpeckTask::description() { return fmt::format( - "Read speck file {} and write raw star data into {}", _inFilePath, _outFilePath + "Read speck file '{}' and write raw star data into '{}'", + _inFilePath, _outFilePath ); } @@ -71,7 +72,7 @@ void ReadSpeckTask::perform(const Task::ProgressCallback& onProgress) { FitsFileReader fileReader(false); std::vector fullData = fileReader.readSpeckFile( - _inFilePath.string(), + _inFilePath, nRenderValues ); @@ -94,7 +95,7 @@ void ReadSpeckTask::perform(const Task::ProgressCallback& onProgress) { fileStream.close(); } else { - LERROR(fmt::format("Error opening file: {} as output data file", _outFilePath)); + LERROR(fmt::format("Error opening file '{}' as output data file", _outFilePath)); } onProgress(1.f); diff --git a/modules/galaxy/rendering/renderablegalaxy.cpp b/modules/galaxy/rendering/renderablegalaxy.cpp index d9d6293338..4b3873f16b 100644 --- a/modules/galaxy/rendering/renderablegalaxy.cpp +++ b/modules/galaxy/rendering/renderablegalaxy.cpp @@ -222,7 +222,7 @@ namespace { std::ofstream fileStream(file, std::ofstream::binary); if (!fileStream.good()) { - LERROR(fmt::format("Error opening file {} for save cache file", file)); + LERROR(fmt::format("Error opening file '{}' for save cache file", file)); return; } @@ -361,8 +361,8 @@ void RenderableGalaxy::initialize() { ); const bool hasCachedFile = std::filesystem::is_regular_file(cachedPointsFile); if (hasCachedFile) { - LINFO(fmt::format("Cached file {} used for galaxy point file {}", - cachedPointsFile, std::filesystem::path(_pointsFilename) + LINFO(fmt::format("Cached file '{}' used for galaxy point file '{}'", + cachedPointsFile, _pointsFilename )); Result res = loadCachedFile(cachedPointsFile); @@ -460,7 +460,7 @@ void RenderableGalaxy::initializeGL() { if (_pointSpreadFunctionTexture) { LDEBUG(fmt::format( - "Loaded texture from {}", absPath(_pointSpreadFunctionTexturePath) + "Loaded texture from '{}'", absPath(_pointSpreadFunctionTexturePath) )); _pointSpreadFunctionTexture->uploadTexture(); } @@ -776,14 +776,14 @@ RenderableGalaxy::Result RenderableGalaxy::loadCachedFile( { std::ifstream fileStream(file, std::ifstream::binary); if (!fileStream.good()) { - LERROR(fmt::format("Error opening file {} for loading cache file", file)); + LERROR(fmt::format("Error opening file '{}' for loading cache file", file)); return { false, {}, {} }; } int8_t cacheVersion; fileStream.read(reinterpret_cast(&cacheVersion), sizeof(int8_t)); if (cacheVersion != CurrentCacheVersion) { - LINFO(fmt::format("Removing cache file {} as the version changed", file)); + LINFO(fmt::format("Removing cache file '{}' as the version changed", file)); return { false, {}, {} }; } diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index d88976dcfd..42010a2fff 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -230,10 +230,13 @@ void GlobeBrowsingModule::internalInitialize(const ghoul::Dictionary& dict) { _hasDefaultGeoPointTexture = true; } else { - LWARNINGC("GlobeBrowsingModule", fmt::format( - "The provided texture file {} for the default geo point texture " - "does not exist", path - )); + LWARNINGC( + "GlobeBrowsingModule", + fmt::format( + "The provided texture file '{}' for the default geo point texture " + "does not exist", path + ) + ); } }); diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index 848b1726dc..2efab28eb2 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -191,7 +191,7 @@ namespace { SceneGraphNode* n = sceneGraphNode(globeIdentifier); if (!n) { - throw ghoul::lua::LuaError(fmt::format("Unknown globe: {}", globeIdentifier)); + throw ghoul::lua::LuaError(fmt::format("Unknown globe '{}'", globeIdentifier)); } RenderableGlobe* globe = dynamic_cast(n->renderable()); @@ -201,7 +201,7 @@ namespace { layers::Group::ID group = ghoul::from_string(layerGroup); if (group == layers::Group::ID::Unknown) { - throw ghoul::lua::LuaError(fmt::format("Unknown layer group: {}", layerGroup)); + throw ghoul::lua::LuaError(fmt::format("Unknown layer group '{}'", layerGroup)); } LayerGroup& lg = globe->layerManager().layerGroup(group); @@ -669,7 +669,7 @@ geoPositionForCameraDeprecated(bool useEyePosition = false) std::filesystem::path path = absPath(filename); if (!std::filesystem::is_regular_file(path)) { throw ghoul::lua::LuaError(fmt::format( - "Could not find the provided file: '{}'", filename + "Could not find the provided file '{}'", filename )); } @@ -678,7 +678,7 @@ geoPositionForCameraDeprecated(bool useEyePosition = false) if (extension != ".geojson" && extension != ".json") { throw ghoul::lua::LuaError(fmt::format( - "Unexpected file type: '{}'. Expected '.geojson' or '.json' file", filename + "Unexpected file type '{}'. Expected '.geojson' or '.json' file", filename )); } diff --git a/modules/globebrowsing/src/gdalwrapper.cpp b/modules/globebrowsing/src/gdalwrapper.cpp index 06d547b825..48fba4af15 100644 --- a/modules/globebrowsing/src/gdalwrapper.cpp +++ b/modules/globebrowsing/src/gdalwrapper.cpp @@ -140,7 +140,7 @@ void GdalWrapper::setGdalProxyConfiguration() { const std::string proxy = address + ":" + std::to_string(port); CPLSetConfigOption("GDAL_HTTP_PROXY", proxy.c_str()); - LDEBUG(fmt::format("Using proxy server {}", proxy)); + LDEBUG(fmt::format("Using proxy server '{}'", proxy)); if (!user.empty() && !password.empty()) { std::string userPwd = user + ":" + password; diff --git a/modules/globebrowsing/src/geojson/geojsoncomponent.cpp b/modules/globebrowsing/src/geojson/geojsoncomponent.cpp index 7127c5b3d9..0f28a8fe61 100644 --- a/modules/globebrowsing/src/geojson/geojsoncomponent.cpp +++ b/modules/globebrowsing/src/geojson/geojsoncomponent.cpp @@ -369,7 +369,7 @@ GeoJsonComponent::GeoJsonComponent(const ghoul::Dictionary& dictionary, } else { LERROR(fmt::format( - "Provided texture file does not exist: '{}'", + "Provided texture file does not exist: {}", _defaultProperties.pointTexture.value() )); } @@ -629,7 +629,7 @@ void GeoJsonComponent::readFile() { catch (const geos::util::GEOSException& e) { LERROR(fmt::format( "Error creating GeoJson layer with identifier '{}'. Problem reading " - "GeoJson file '{}'. Error: '{}'", identifier(), _geoJsonFile.value(), e.what() + "GeoJson file '{}'. Error: {}", identifier(), _geoJsonFile.value(), e.what() )); } diff --git a/modules/globebrowsing/src/geojson/globegeometryfeature.cpp b/modules/globebrowsing/src/geojson/globegeometryfeature.cpp index 3ca1b9c6c7..381f8c2b3a 100644 --- a/modules/globebrowsing/src/geojson/globegeometryfeature.cpp +++ b/modules/globebrowsing/src/geojson/globegeometryfeature.cpp @@ -152,7 +152,7 @@ void GlobeGeometryFeature::updateTexture(bool isInitializeStep) { } else { LERROR(fmt::format( - "Trying to use texture file that does not exist: {} ", texturePath + "Trying to use texture file that does not exist: {}", texturePath )); } } @@ -234,7 +234,7 @@ void GlobeGeometryFeature::createFromSingleGeosGeometry(const geos::geom::Geomet catch (geos::util::IllegalStateException& e) { throw ghoul::RuntimeError(fmt::format( "Non-simple (e.g. self-intersecting) polygons not supported yet. " - "GEOS error: '{}'", e.what() + "GEOS error: {}", e.what() )); // TODO: handle self-intersections points diff --git a/modules/globebrowsing/src/globelabelscomponent.cpp b/modules/globebrowsing/src/globelabelscomponent.cpp index 0755f28901..233dfe5a69 100644 --- a/modules/globebrowsing/src/globelabelscomponent.cpp +++ b/modules/globebrowsing/src/globelabelscomponent.cpp @@ -320,7 +320,9 @@ bool GlobeLabelsComponent::loadLabelsData(const std::filesystem::path& file) { bool hasCachedFile = std::filesystem::is_regular_file(cachedFile); if (hasCachedFile) { - LINFO(fmt::format("Cached file {} used for labels file {}", cachedFile, file)); + LINFO(fmt::format( + "Cached file '{}' used for labels file '{}'", cachedFile, file + )); const bool hasCache = loadCachedFile(cachedFile); if (hasCache) { @@ -333,9 +335,9 @@ bool GlobeLabelsComponent::loadLabelsData(const std::filesystem::path& file) { } } else { - LINFO(fmt::format("Cache for labels file {} not found", file)); + LINFO(fmt::format("Cache for labels file '{}' not found", file)); } - LINFO(fmt::format("Loading labels file {}", file)); + LINFO(fmt::format("Loading labels file '{}'", file)); bool success = readLabelsFile(file); if (success) { @@ -348,7 +350,7 @@ bool GlobeLabelsComponent::readLabelsFile(const std::filesystem::path& file) { try { std::fstream csvLabelFile(file); if (!csvLabelFile.good()) { - LERROR(fmt::format("Failed to open labels file {}", file)); + LERROR(fmt::format("Failed to open labels file '{}'", file)); return false; } if (!csvLabelFile.is_open()) { @@ -433,7 +435,7 @@ bool GlobeLabelsComponent::readLabelsFile(const std::filesystem::path& file) { return true; } catch (const std::fstream::failure& e) { - LERROR(fmt::format("Failed reading labels file {}", file)); + LERROR(fmt::format("Failed reading labels file '{}'", file)); LERROR(e.what()); return false; } @@ -442,7 +444,7 @@ bool GlobeLabelsComponent::readLabelsFile(const std::filesystem::path& file) { bool GlobeLabelsComponent::loadCachedFile(const std::filesystem::path& file) { std::ifstream fileStream(file, std::ifstream::binary); if (!fileStream.good()) { - LERROR(fmt::format("Error opening file {} for loading cache file", file)); + LERROR(fmt::format("Error opening file '{}' for loading cache file", file)); return false; } @@ -472,7 +474,7 @@ bool GlobeLabelsComponent::loadCachedFile(const std::filesystem::path& file) { bool GlobeLabelsComponent::saveCachedFile(const std::filesystem::path& file) const { std::ofstream fileStream(file, std::ofstream::binary); if (!fileStream.good()) { - LERROR(fmt::format("Error opening file {} for save cache file", file)); + LERROR(fmt::format("Error opening file '{}' for save cache file", file)); return false; } fileStream.write(reinterpret_cast(&CurrentCacheVersion), sizeof(int8_t)); diff --git a/modules/globebrowsing/src/layermanager.cpp b/modules/globebrowsing/src/layermanager.cpp index f013505b00..31302cda24 100644 --- a/modules/globebrowsing/src/layermanager.cpp +++ b/modules/globebrowsing/src/layermanager.cpp @@ -72,7 +72,7 @@ void LayerManager::initialize(const ghoul::Dictionary& layerGroupsDict) { _layerGroups[static_cast(id)]->setLayersFromDict(d); } else { - LWARNINGC("LayerManager", fmt::format("Unknown layer group: {}", groupName)); + LWARNINGC("LayerManager", fmt::format("Unknown layer group '{}'", groupName)); } } diff --git a/modules/globebrowsing/src/rawtiledatareader.cpp b/modules/globebrowsing/src/rawtiledatareader.cpp index d6666ede97..42ce6dfdb7 100644 --- a/modules/globebrowsing/src/rawtiledatareader.cpp +++ b/modules/globebrowsing/src/rawtiledatareader.cpp @@ -283,7 +283,7 @@ std::optional RawTileDataReader::mrfCache() { for (std::string_view fmt : Unsupported) { if (_datasetFilePath.ends_with(fmt)) { LWARNING(fmt::format( - "Unsupported file format for MRF caching: {}, Dataset: {}", + "Unsupported file format for MRF caching: '{}', Dataset: '{}'", fmt, _datasetFilePath )); return std::nullopt; @@ -305,8 +305,8 @@ std::optional RawTileDataReader::mrfCache() { // Already existing directories causes a 'failure' but no error if (ec) { LWARNING(fmt::format( - "Failed to create directories for cache at: {}. " - "Error Code: {}, message: {}", + "Failed to create directories for cache at: '{}'. " + "Error Code: '{}', message: {}", root, std::to_string(ec.value()), ec.message() )); return std::nullopt; @@ -320,7 +320,7 @@ std::optional RawTileDataReader::mrfCache() { ); if (!src) { LWARNING(fmt::format( - "Failed to load dataset: {}. GDAL Error: {}", + "Failed to load dataset '{}'. GDAL error: {}", _datasetFilePath, CPLGetLastErrorMsg() )); return std::nullopt; @@ -357,7 +357,7 @@ std::optional RawTileDataReader::mrfCache() { ); if (!dst) { LWARNING(fmt::format( - "Failed to create MRF Caching dataset dataset: {}. GDAL Error: {}", + "Failed to create MRF Caching dataset dataset '{}'. GDAL error: {}", mrf, CPLGetLastErrorMsg() )); return std::nullopt; @@ -398,7 +398,7 @@ void RawTileDataReader::initialize() { _dataset = static_cast(GDALOpen(content.c_str(), GA_ReadOnly)); if (!_dataset) { throw ghoul::RuntimeError(fmt::format( - "Failed to load dataset: {}. GDAL Error: {}", + "Failed to load dataset '{}'. GDAL error: {}", _datasetFilePath, CPLGetLastErrorMsg() )); } diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index 476442c978..783373fe2b 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -866,7 +866,7 @@ void RenderableGlobe::renderSecondary(const RenderData& data, RendererTasks&) { _globeLabelsComponent.draw(data); } catch (const ghoul::opengl::TextureUnit::TextureUnitError& e) { - LERROR(fmt::format("Error on drawing globe labels: '{}'", e.message)); + LERROR(fmt::format("Error on drawing globe labels '{}'", e.message)); } if (_geoJsonManager.isReady()) { diff --git a/modules/globebrowsing/src/ringscomponent.cpp b/modules/globebrowsing/src/ringscomponent.cpp index 74642535db..10543c1c82 100644 --- a/modules/globebrowsing/src/ringscomponent.cpp +++ b/modules/globebrowsing/src/ringscomponent.cpp @@ -665,7 +665,7 @@ void RingsComponent::loadTexture() { if (texture) { LDEBUGC( "RingsComponent", - fmt::format("Loaded texture from {}", absPath(_texturePath)) + fmt::format("Loaded texture from '{}'", absPath(_texturePath)) ); _texture = std::move(texture); @@ -689,7 +689,7 @@ void RingsComponent::loadTexture() { LDEBUGC( "RingsComponent", fmt::format( - "Loaded forwards scattering texture from {}", + "Loaded forwards scattering texture from '{}'", absPath(_textureFwrdPath) ) ); @@ -716,7 +716,7 @@ void RingsComponent::loadTexture() { LDEBUGC( "RingsComponent", fmt::format( - "Loaded backwards scattering texture from {}", + "Loaded backwards scattering texture from '{}'", absPath(_textureBckwrdPath) ) ); @@ -742,7 +742,7 @@ void RingsComponent::loadTexture() { if (textureUnlit) { LDEBUGC( "RingsComponent", - fmt::format("Loaded unlit texture from {}", absPath(_textureUnlitPath)) + fmt::format("Loaded unlit texture from '{}'", absPath(_textureUnlitPath)) ); _textureUnlit = std::move(textureUnlit); @@ -765,7 +765,7 @@ void RingsComponent::loadTexture() { if (textureColor) { LDEBUGC( "RingsComponent", - fmt::format("Loaded color texture from {}", absPath(_textureColorPath)) + fmt::format("Loaded color texture from '{}'", absPath(_textureColorPath)) ); _textureColor = std::move(textureColor); @@ -788,7 +788,7 @@ void RingsComponent::loadTexture() { if (textureTransparency) { LDEBUGC( "RingsComponent", - fmt::format("Loaded unlit texture from {}", absPath(_textureUnlitPath)) + fmt::format("Loaded unlit texture from '{}'", absPath(_textureUnlitPath)) ); _textureTransparency = std::move(textureTransparency); diff --git a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp index 13361a8025..d8b01d71ef 100644 --- a/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/sizereferencetileprovider.cpp @@ -93,7 +93,7 @@ Tile SizeReferenceTileProvider::tile(const TileIndex& tileIndex) { unit = "m"; } - std::string text = fmt::format(" {:.0f} {:s}", tileLongitudalLength, unit); + std::string text = fmt::format("{:.0f} {:s}", tileLongitudalLength, unit); glm::vec2 textPosition = glm::vec2( 0.f, aboveEquator ? diff --git a/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp index a92c98a846..4107e89dbe 100644 --- a/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/src/tileprovider/temporaltileprovider.cpp @@ -218,7 +218,7 @@ TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) } catch (const ghoul::RuntimeError& e) { throw ghoul::RuntimeError(fmt::format( - "Could not create time quantizer for Temporal GDAL dataset. {}", e.message + "Could not create time quantizer for Temporal GDAL dataset: {}", e.message )); } @@ -295,7 +295,7 @@ TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary) if (_folder.files.empty()) { throw ghoul::RuntimeError(fmt::format( - "Error loading layer '{}'. Folder {} does not contain any files that " + "Error loading layer '{}'. Folder '{}' does not contain any files that " "matched the time format", _identifier, _folder.folder )); diff --git a/modules/globebrowsing/src/timequantizer.cpp b/modules/globebrowsing/src/timequantizer.cpp index b7c43d86e6..cd67b732cd 100644 --- a/modules/globebrowsing/src/timequantizer.cpp +++ b/modules/globebrowsing/src/timequantizer.cpp @@ -388,9 +388,7 @@ void TimeQuantizer::verifyStartTimeRestrictions() { if (_start.day() < 1 || _start.day() > dayUpperLimit) { throw ghoul::RuntimeError(fmt::format( "Invalid start day value of {} for {}, valid days are 1 - {}", - _start.day(), - helpfulDescription, - dayUpperLimit + _start.day(), helpfulDescription, dayUpperLimit )); } if (_start.hour() != 0 || _start.minute() != 0 || _start.second() != 0) { diff --git a/modules/imgui/imguimodule.cpp b/modules/imgui/imguimodule.cpp index e75a2f2499..451fa63d79 100644 --- a/modules/imgui/imguimodule.cpp +++ b/modules/imgui/imguimodule.cpp @@ -281,7 +281,7 @@ void ImGUIModule::internalDeinitialize() { void ImGUIModule::internalInitializeGL() { std::filesystem::path file = FileSys.cacheManager()->cachedFilename("imgui.ini", ""); - LDEBUG(fmt::format("Using {} as ImGUI cache location", file)); + LDEBUG(fmt::format("Using '{}' as ImGUI cache location", file)); _iniFileBuffer.resize(file.string().size() + 1); diff --git a/modules/imgui/src/guiglobebrowsingcomponent.cpp b/modules/imgui/src/guiglobebrowsingcomponent.cpp index b8e712ef8f..9f7d4d4032 100644 --- a/modules/imgui/src/guiglobebrowsingcomponent.cpp +++ b/modules/imgui/src/guiglobebrowsingcomponent.cpp @@ -270,7 +270,7 @@ void GuiGlobeBrowsingComponent::render() { Capabilities cap = module->capabilities(_currentServer); if (cap.empty()) { - LWARNINGC("GlobeBrowsing", fmt::format("Unknown server: '{}'", _currentServer)); + LWARNINGC("GlobeBrowsing", fmt::format("Unknown server '{}'", _currentServer)); } ImGui::Columns(6, nullptr, false); diff --git a/modules/iswa/rendering/texturecygnet.cpp b/modules/iswa/rendering/texturecygnet.cpp index f5a6dc28ec..81bc8666cd 100644 --- a/modules/iswa/rendering/texturecygnet.cpp +++ b/modules/iswa/rendering/texturecygnet.cpp @@ -53,7 +53,7 @@ bool TextureCygnet::updateTexture() { if (texture) { LDEBUG(fmt::format( - "Loaded texture from image iswa cygnet with id: '{}'", _data.id + "Loaded texture from image iswa cygnet with id '{}'", _data.id )); texture->uploadTexture(); // Textures of planets looks much smoother with AnisotropicMipMap diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index 86fe3e3ff1..7a2197ff1a 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -622,7 +622,7 @@ void IswaManager::createKameleonPlane(CdfInfo info, std::string cut) { } else { LWARNING( - fmt::format("{} is not a cdf file or can't be found", absPath(info.path)) + fmt::format("'{}' is not a CDF file or cannot be found", absPath(info.path)) ); } } @@ -630,7 +630,7 @@ void IswaManager::createKameleonPlane(CdfInfo info, std::string cut) { void IswaManager::createFieldline(std::string name, std::string cdfPath, std::string seedPath) { - std::filesystem::path ext = std::filesystem::path(absPath(cdfPath)).extension(); + std::filesystem::path ext = absPath(cdfPath).extension(); if (std::filesystem::is_regular_file(absPath(cdfPath)) && ext == ".cdf") { std::string luaTable = "{" "Name = '" + name + "'," @@ -744,7 +744,7 @@ void IswaManager::addCdfFiles(std::string cdfpath) { } } else { - LWARNING(fmt::format("{} is not a cdf file or can't be found", cdfFile)); + LWARNING(fmt::format("'{}' is not a CDF file or cannot be found", cdfFile)); } } diff --git a/modules/iswa/util/iswamanager_lua.inl b/modules/iswa/util/iswamanager_lua.inl index ac98898112..b65d16a411 100644 --- a/modules/iswa/util/iswamanager_lua.inl +++ b/modules/iswa/util/iswamanager_lua.inl @@ -51,7 +51,7 @@ namespace { if (global::renderEngine->screenSpaceRenderable(name)) { throw ghoul::lua::LuaError(fmt::format( - "A cygnet with the name \"{}\" already exist", name + "A cygnet with the name '{}' already exist", name )); } else { diff --git a/modules/kameleon/src/kameleonhelper.cpp b/modules/kameleon/src/kameleonhelper.cpp index c5726aecb4..460cfddff8 100644 --- a/modules/kameleon/src/kameleonhelper.cpp +++ b/modules/kameleon/src/kameleonhelper.cpp @@ -50,17 +50,17 @@ namespace openspace::kameleonHelper { std::unique_ptr createKameleonObject(const std::string& cdfFilePath) { auto kameleon = std::make_unique(); - LDEBUG(fmt::format("\tOpening the cdf file: {}", cdfFilePath)); + LDEBUG(fmt::format("Opening the CDF file '{}'", cdfFilePath)); long kamStatus = kameleon->open(cdfFilePath); if (kamStatus != ccmc::FileReader::OK) { LERROR(fmt::format( - "Failed to create a Kameleon Object from file: {}", + "Failed to create a Kameleon Object from file '{}'", cdfFilePath )); return nullptr; } - LDEBUG(fmt::format("\tSuccessfully opened: {}", cdfFilePath)); + LDEBUG(fmt::format("Successfully opened '{}'", cdfFilePath)); return kameleon; } diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index 291718baa4..94c3982a76 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -172,7 +172,9 @@ float* KameleonWrapper::uniformSampledValues(const std::string& var, { ghoul_assert(_model && _interpolator, "Model and interpolator must exist"); - LINFO(fmt::format("Loading variable {} from CDF data with a uniform sampling", var)); + LINFO(fmt::format( + "Loading variable '{}' from CDF data with a uniform sampling", var + )); const size_t size = outDimensions.x * outDimensions.y * outDimensions.z; float* data = new float[size]; @@ -323,7 +325,7 @@ float* KameleonWrapper::uniformSliceValues(const std::string& var, { ghoul_assert(_model && _interpolator, "Model and interpolator must exist"); LINFO(fmt::format( - "Loading variable {} from CDF data with a uniform sampling", + "Loading variable '{}' from CDF data with a uniform sampling", var )); @@ -454,7 +456,7 @@ float* KameleonWrapper::uniformSampledVectorValues(const std::string& xVar, ghoul_assert(_model && _interpolator, "Model and interpolator must exist"); LINFO(fmt::format( - "loading variables {} {} {} from CDF data with a uniform sampling", + "Loading variables {} {} {} from CDF data with a uniform sampling", xVar, yVar, zVar diff --git a/modules/kameleonvolume/kameleonvolumereader.cpp b/modules/kameleonvolume/kameleonvolumereader.cpp index 76d51ac77f..577611b777 100644 --- a/modules/kameleonvolume/kameleonvolumereader.cpp +++ b/modules/kameleonvolume/kameleonvolumereader.cpp @@ -83,8 +83,9 @@ KameleonVolumeReader::KameleonVolumeReader(std::string path) : _path(std::move(p const long status = _kameleon->open(_path); if (status != ccmc::FileReader::OK) { - LERROR(fmt::format("Failed to open file '{}' with Kameleon", _path)); - throw ghoul::RuntimeError("Failed to open file: " + _path + " with Kameleon"); + throw ghoul::RuntimeError(fmt::format( + "Failed to open file '{}' with Kameleon", _path + )); } // Possibly use a kameleon interpolator instead of a model interpolator? diff --git a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp index 4fe1d2f4a0..136d4ea0c4 100644 --- a/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp +++ b/modules/kameleonvolume/tasks/kameleondocumentationtask.cpp @@ -65,7 +65,7 @@ KameleonDocumentationTask::KameleonDocumentationTask(const ghoul::Dictionary& di std::string KameleonDocumentationTask::description() { return fmt::format( - "Extract metadata from cdf file {} and output html documentation to {}", + "Extract metadata from CDF file '{}' and output HTML documentation to '{}'", _inputPath, _outputPath ); } diff --git a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp index 38dae18c03..00069bae93 100644 --- a/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp +++ b/modules/kameleonvolume/tasks/kameleonmetadatatojsontask.cpp @@ -59,7 +59,7 @@ KameleonMetadataToJsonTask::KameleonMetadataToJsonTask( std::string KameleonMetadataToJsonTask::description() { return fmt::format( - "Extract metadata from cdf file {} and write as json to {}", + "Extract metadata from CDF file '{}' and write as JSON to '{}'", _inputPath, _outputPath ); } diff --git a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp index 3ed9c394cc..09c5658d9a 100644 --- a/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp +++ b/modules/kameleonvolume/tasks/kameleonvolumetorawtask.cpp @@ -98,8 +98,8 @@ KameleonVolumeToRawTask::KameleonVolumeToRawTask(const ghoul::Dictionary& dictio std::string KameleonVolumeToRawTask::description() { return fmt::format( - "Extract volumetric data from cdf file {}. Write raw volume data into {} " - "and dictionary with metadata to {}", + "Extract volumetric data from CDF file '{}'. Write raw volume data into '{}' " + "and dictionary with metadata to '{}'", _inputPath, _rawVolumeOutputPath, _dictionaryOutputPath ); } diff --git a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp index 14bdf6a753..e750f653aa 100644 --- a/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/localerrorhistogrammanager.cpp @@ -135,9 +135,7 @@ bool LocalErrorHistogramManager::buildFromOctreeChild(unsigned int bstOffset, else { LERROR(fmt::format( "Child {} visited without cache, {}, {}", - childIndex, - bstOffset, - octreeOffset + childIndex, bstOffset, octreeOffset )); return false; } diff --git a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp index 6189d4d20f..cf3ec17421 100644 --- a/modules/multiresvolume/rendering/renderablemultiresvolume.cpp +++ b/modules/multiresvolume/rendering/renderablemultiresvolume.cpp @@ -482,28 +482,28 @@ bool RenderableMultiresVolume::initializeSelector() { ); std::ifstream cacheFile(cached, std::ios::in | std::ios::binary); if (cacheFile.is_open()) { - // Read histograms from cache. + // Read histograms from cache cacheFile.close(); LINFO( - fmt::format("Loading histograms from cache: {}", cached) + fmt::format("Loading histograms from cache '{}'", cached) ); success &= _errorHistogramManager->loadFromFile(cached); } else if (!_errorHistogramsPath.empty()) { - // Read histograms from scene data. + // Read histograms from scene data LINFO(fmt::format( - "Loading histograms from scene data: {}", _errorHistogramsPath + "Loading histograms from scene data '{}'", _errorHistogramsPath )); success &= _errorHistogramManager->loadFromFile( _errorHistogramsPath.string() ); } else { - // Build histograms from tsp file. - LWARNING(fmt::format("Failed to open {}", cached)); + // Build histograms from tsp file + LWARNING(fmt::format("Failed to open '{}'", cached)); success &= _errorHistogramManager->buildHistograms(nHistograms); if (success) { - LINFO(fmt::format("Writing cache to {}", cached)); + LINFO(fmt::format("Writing cache to '{}'", cached)); _errorHistogramManager->saveToFile(cached); } } @@ -523,18 +523,18 @@ bool RenderableMultiresVolume::initializeSelector() { if (cacheFile.is_open()) { // Read histograms from cache. cacheFile.close(); - LINFO(fmt::format("Loading histograms from {}", cached)); + LINFO(fmt::format("Loading histograms from '{}'", cached)); success &= _histogramManager->loadFromFile(cached); } else { // Build histograms from tsp file. - LWARNING(fmt::format("Failed to open {}", cached)); + LWARNING(fmt::format("Failed to open '{}'", cached)); success &= _histogramManager->buildHistograms( _tsp.get(), nHistograms ); if (success) { - LINFO(fmt::format("Writing cache to {}", cached)); + LINFO(fmt::format("Writing cache to '{}'", cached)); _histogramManager->saveToFile(cached); } } @@ -555,15 +555,15 @@ bool RenderableMultiresVolume::initializeSelector() { if (cacheFile.is_open()) { // Read histograms from cache. cacheFile.close(); - LINFO(fmt::format("Loading histograms from {}", cached)); + LINFO(fmt::format("Loading histograms from '{}'", cached)); success &= _localErrorHistogramManager->loadFromFile(cached); } else { // Build histograms from tsp file. - LWARNING(fmt::format("Failed to open {}", cached)); + LWARNING(fmt::format("Failed to open '{}'", cached)); success &= _localErrorHistogramManager->buildHistograms(nHistograms); if (success) { - LINFO(fmt::format("Writing cache to {}", cached)); + LINFO(fmt::format("Writing cache to '{}'", cached)); _localErrorHistogramManager->saveToFile(cached); } } diff --git a/modules/server/src/connection.cpp b/modules/server/src/connection.cpp index 53026656fe..3465a58ec7 100644 --- a/modules/server/src/connection.cpp +++ b/modules/server/src/connection.cpp @@ -126,7 +126,7 @@ void Connection::handleMessage(const std::string& message) { if (!isAuthorized()) { _socket->disconnect(); LERROR(fmt::format( - "Could not parse JSON: '{}'. Connection is unauthorized. Disconnecting", + "Could not parse JSON '{}'. Connection is unauthorized. Disconnecting", message )); return; @@ -141,7 +141,7 @@ void Connection::handleMessage(const std::string& message) { return std::isprint(c, std::locale("")) ? char(c) : ' '; } ); - LERROR(fmt::format("Could not parse JSON: '{}'", sanitizedString)); + LERROR(fmt::format("Could not parse JSON '{}'", sanitizedString)); } } } diff --git a/modules/server/src/topics/flightcontrollertopic.cpp b/modules/server/src/topics/flightcontrollertopic.cpp index fe29905348..a646af53b0 100644 --- a/modules/server/src/topics/flightcontrollertopic.cpp +++ b/modules/server/src/topics/flightcontrollertopic.cpp @@ -175,7 +175,7 @@ void FlightControllerTopic::handleJson(const nlohmann::json& json) { auto it = CommandMap.find(json[TypeKey]); if (it == CommandMap.end()) { LWARNING( - fmt::format("Poorly formatted JSON command: no '{}' in payload", TypeKey) + fmt::format("Malformed JSON command: no '{}' in payload", TypeKey) ); return; } @@ -270,15 +270,15 @@ void FlightControllerTopic::changeFocus(const nlohmann::json& json) const { if (json.find(FocusKey) == json.end()) { const std::string j = json; LWARNING( - fmt::format("Could not find {} key in JSON. JSON was:\n{}", FocusKey, j) + fmt::format("Could not find '{}' key in JSON. JSON was:\n{}", FocusKey, j) ); if (json.find(AimKey) == json.end()) { LWARNING( - fmt::format("Could not find {} key in JSON. JSON was:\n{}", AimKey, j) + fmt::format("Could not find '{}' key in JSON. JSON was:\n{}", AimKey, j) ); if (json.find(AnchorKey) == json.end()) { LWARNING(fmt::format( - "Could not find {} key in JSON. JSON was:\n{}", AnchorKey, j + "Could not find '{}' key in JSON. JSON was:\n{}", AnchorKey, j )); return; } @@ -324,7 +324,7 @@ void FlightControllerTopic::setRenderableEnabled(const nlohmann::json& json) con if (json[RenderableKey].find(SceneNodeName) == json[RenderableKey].end()) { const std::string j = json; LWARNING( - fmt::format("Could not find {} key in JSON. JSON was:\n{}", FocusKey, j) + fmt::format("Could not find '{}' key in JSON. JSON was:\n{}", FocusKey, j) ); return; } @@ -394,7 +394,7 @@ void FlightControllerTopic::engageAutopilot(const nlohmann::json &json) { if (mapIt == AxisIndexMap.end()) { if (it.key() != TypeKey || CommandMap.find(it.value()) == CommandMap.end()) { LWARNING(fmt::format( - "No axis, button, or command named {} (value: {})", + "No axis, button, or command named '{}' (value: {})", it.key(), static_cast(it.value()) )); } @@ -434,7 +434,7 @@ void FlightControllerTopic::processInputState(const nlohmann::json& json) { if (mapIt == AxisIndexMap.end()) { if (it.key() != TypeKey || CommandMap.find(it.value()) == CommandMap.end()) { LWARNING(fmt::format( - "No axis, button, or command named {} (value: {})", + "No axis, button, or command named '{}' (value: {})", it.key() , static_cast(it.value()) )); } diff --git a/modules/skybrowser/skybrowsermodule_lua.inl b/modules/skybrowser/skybrowsermodule_lua.inl index b085b52df0..131fe47d3a 100644 --- a/modules/skybrowser/skybrowsermodule_lua.inl +++ b/modules/skybrowser/skybrowsermodule_lua.inl @@ -112,7 +112,7 @@ std::string prunedIdentifier(std::string identifier) { ); if (!found.has_value()) { LINFO(fmt::format( - "No image with identifier {} was found in the collection.", imageUrl + "No image with identifier '{}' was found in the collection.", imageUrl )); return; } @@ -161,7 +161,7 @@ std::string prunedIdentifier(std::string identifier) { SceneGraphNode* circle = global::renderEngine->scene()->sceneGraphNode(identifier); if (!circle) { throw ghoul::lua::LuaError(fmt::format( - "Could not find node to set as hover circle: '{}'", identifier + "Could not find node to set as hover circle: {}", identifier )); } diff --git a/modules/skybrowser/src/browser.cpp b/modules/skybrowser/src/browser.cpp index 7cf5b127c6..bf9918ffc2 100644 --- a/modules/skybrowser/src/browser.cpp +++ b/modules/skybrowser/src/browser.cpp @@ -139,7 +139,7 @@ void Browser::deinitializeGL() { _texture = nullptr; - LDEBUG(fmt::format("Deinitializing browser: {}", _url.value())); + LDEBUG(fmt::format("Deinitializing browser '{}'", _url.value())); _browserInstance->close(true); diff --git a/modules/skybrowser/src/wwtdatahandler.cpp b/modules/skybrowser/src/wwtdatahandler.cpp index f2e714641a..808c3a2af1 100644 --- a/modules/skybrowser/src/wwtdatahandler.cpp +++ b/modules/skybrowser/src/wwtdatahandler.cpp @@ -136,7 +136,7 @@ namespace { const bool success = downloadFile(url, file); if (!success) { LINFO(fmt::format( - "Could not download file '{}' to directory {}", url, directory + "Could not download file '{}' to directory '{}'", url, directory )); return false; } @@ -154,7 +154,7 @@ namespace { // If the file contains no folders, or there are folders but without urls, // stop recursion if (!folderExists || folderContainNoUrls) { - LINFO(fmt::format("Saving {}", url)); + LINFO(fmt::format("Saving '{}'", url)); return true; } @@ -261,7 +261,7 @@ void WwtDataHandler::loadImages(const std::string& root, // 1. if (!directoryExists(directory)) { - LINFO(fmt::format("Creating directory {}", directory)); + LINFO(fmt::format("Creating directory '{}'", directory)); std::filesystem::create_directory(directory); } diff --git a/modules/space/horizonsfile.cpp b/modules/space/horizonsfile.cpp index efb5036811..fabd20b143 100644 --- a/modules/space/horizonsfile.cpp +++ b/modules/space/horizonsfile.cpp @@ -130,7 +130,7 @@ json sendHorizonsRequest(const std::string& url, std::filesystem::path filePath) bool failed = false; dl->wait(); if (!dl->hasSucceeded()) { - LERROR(fmt::format("Error downloading horizons file with URL {}", dl->url())); + LERROR(fmt::format("Error downloading horizons file with URL '{}'", dl->url())); failed = true; } diff --git a/modules/space/kepler.cpp b/modules/space/kepler.cpp index 0e6ca11493..55d9978c3e 100644 --- a/modules/space/kepler.cpp +++ b/modules/space/kepler.cpp @@ -734,7 +734,7 @@ std::vector readFile(std::filesystem::path file, Format format) { std::filesystem::path cachedFile = FileSys.cacheManager()->cachedFilename(file); if (std::filesystem::is_regular_file(cachedFile)) { LINFO(fmt::format( - "Cached file {} used for Kepler file {}", cachedFile, file + "Cached file '{}' used for Kepler file '{}'", cachedFile, file )); std::optional> res = loadCache(cachedFile); @@ -758,7 +758,7 @@ std::vector readFile(std::filesystem::path file, Format format) { break; } - LINFO(fmt::format("Saving cache {} for Kepler file {}", cachedFile, file)); + LINFO(fmt::format("Saving cache '{}' for Kepler file '{}'", cachedFile, file)); saveCache(res, cachedFile); return res; } diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index a495d303e1..abc67aeaf3 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -258,7 +258,7 @@ bool RenderableConstellationBounds::loadVertexFile() { // If this evaluates to true, the stream was not completely filled, which // means that the line was incomplete, so there was an error LERROR(fmt::format( - "Error reading file {} at line #{}", fileName, currentLineNumber + "Error reading file '{}' at line #{}", fileName, currentLineNumber )); break; } diff --git a/modules/space/rendering/renderableconstellationlines.cpp b/modules/space/rendering/renderableconstellationlines.cpp index 8958b85b7d..a4182b6734 100644 --- a/modules/space/rendering/renderableconstellationlines.cpp +++ b/modules/space/rendering/renderableconstellationlines.cpp @@ -314,10 +314,10 @@ bool RenderableConstellationLines::readSpeckFile() { } std::filesystem::path fileName = absPath(_speckFile); - LINFO(fmt::format("Loading Speck file {}", fileName)); + LINFO(fmt::format("Loading Speck file '{}'", fileName)); std::ifstream file(fileName); if (!file.good()) { - LERROR(fmt::format("Failed to open Speck file {}", fileName)); + LERROR(fmt::format("Failed to open Speck file '{}'", fileName)); return false; } @@ -369,8 +369,10 @@ bool RenderableConstellationLines::readSpeckFile() { str >> constellationLine.colorIndex; // color index } else { - std::string message = fmt::format("Unknown command '{}' found in " - "constellation file '{}'", dummy, fileName); + std::string message = fmt::format( + "Unknown command '{}' found in constellation file '{}'", + dummy, fileName + ); LWARNING(message); } dummy.clear(); @@ -415,7 +417,7 @@ bool RenderableConstellationLines::readSpeckFile() { } else { LERROR(fmt::format( - "Failed reading position on line {} of mesh {} in file: '{}'. " + "Failed reading position on line {} of mesh {} in file '{}'. " "Stopped reading constellation data", l, lineIndex, fileName )); } diff --git a/modules/space/rendering/renderablefluxnodes.cpp b/modules/space/rendering/renderablefluxnodes.cpp index 66bb4bc2ad..4070b993c4 100644 --- a/modules/space/rendering/renderablefluxnodes.cpp +++ b/modules/space/rendering/renderablefluxnodes.cpp @@ -359,12 +359,12 @@ RenderableFluxNodes::RenderableFluxNodes(const ghoul::Dictionary& dictionary) // Ensure that there are available and valid source files left if (_binarySourceFiles.empty()) { - LERROR(fmt::format("{} contains no files", _binarySourceFolderPath)); + LERROR(fmt::format("'{}' contains no files", _binarySourceFolderPath)); } } else { LERROR(fmt::format( - "Source folder {} is not a valid directory", _binarySourceFolderPath + "Source folder '{}' is not a valid directory", _binarySourceFolderPath )); } @@ -646,8 +646,9 @@ void RenderableFluxNodes::populateStartTimes() { _startTimes.push_back(triggerTime); } else { - LERROR(fmt::format("Error in file formating. Last column in ", - "file '{}' is not on UTC ISO8601 format", timeFile + LERROR(fmt::format( + "Error in file formating. Last column in file '{}' is not on UTC " + "ISO8601 format", timeFile )); } } diff --git a/modules/space/rendering/renderablerings.cpp b/modules/space/rendering/renderablerings.cpp index 3d62abbf7e..54ff607863 100644 --- a/modules/space/rendering/renderablerings.cpp +++ b/modules/space/rendering/renderablerings.cpp @@ -246,7 +246,7 @@ void RenderableRings::loadTexture() { if (texture) { LDEBUGC( "RenderableRings", - fmt::format("Loaded texture from {}", absPath(_texturePath)) + fmt::format("Loaded texture from '{}'", absPath(_texturePath)) ); _texture = std::move(texture); diff --git a/modules/space/rendering/renderablestars.cpp b/modules/space/rendering/renderablestars.cpp index d0b5aa88c0..51297fa304 100644 --- a/modules/space/rendering/renderablestars.cpp +++ b/modules/space/rendering/renderablestars.cpp @@ -909,7 +909,7 @@ void RenderableStars::loadPSFTexture() { if (_pointSpreadFunctionTexture) { LDEBUG(fmt::format( - "Loaded texture from {}", absPath(_pointSpreadFunctionTexturePath) + "Loaded texture from '{}'", absPath(_pointSpreadFunctionTexturePath) )); _pointSpreadFunctionTexture->uploadTexture(); } @@ -1309,7 +1309,9 @@ void RenderableStars::update(const UpdateData&) { 1 ); if (_colorTexture) { - LDEBUG(fmt::format("Loaded texture from {}", absPath(_colorTexturePath))); + LDEBUG(fmt::format( + "Loaded texture from '{}'", absPath(_colorTexturePath) + )); _colorTexture->uploadTexture(); } @@ -1333,8 +1335,7 @@ void RenderableStars::update(const UpdateData&) { ); if (_otherDataColorMapTexture) { LDEBUG(fmt::format( - "Loaded texture from {}", - absPath(_otherDataColorMapPath) + "Loaded texture from '{}'", absPath(_otherDataColorMapPath) )); _otherDataColorMapTexture->uploadTexture(); } diff --git a/modules/space/rotation/spicerotation.cpp b/modules/space/rotation/spicerotation.cpp index 2d79142d54..308954107f 100644 --- a/modules/space/rotation/spicerotation.cpp +++ b/modules/space/rotation/spicerotation.cpp @@ -126,7 +126,6 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary) _sourceFrame.onChange([this]() { requireUpdate(); }); _destinationFrame.onChange([this]() { requireUpdate(); }); - } glm::dmat3 SpiceRotation::matrix(const UpdateData& data) const { diff --git a/modules/space/translation/horizonstranslation.cpp b/modules/space/translation/horizonstranslation.cpp index 3fb5c22624..bec5c261f3 100644 --- a/modules/space/translation/horizonstranslation.cpp +++ b/modules/space/translation/horizonstranslation.cpp @@ -210,7 +210,7 @@ bool HorizonsTranslation::loadCachedFile(const std::filesystem::path& file) { std::ifstream fileStream(file, std::ifstream::binary); if (!fileStream.good()) { - LERROR(fmt::format("Error opening file {} for loading cache file", file)); + LERROR(fmt::format("Error opening file '{}' for loading cache file", file)); return false; } @@ -259,7 +259,7 @@ bool HorizonsTranslation::loadCachedFile(const std::filesystem::path& file) { void HorizonsTranslation::saveCachedFile(const std::filesystem::path& file) const { std::ofstream fileStream(file, std::ofstream::binary); if (!fileStream.good()) { - LERROR(fmt::format("Error opening file {} for save cache file", file)); + LERROR(fmt::format("Error opening file '{}' for save cache file", file)); return; } diff --git a/modules/space/translation/spicetranslation.cpp b/modules/space/translation/spicetranslation.cpp index 3fb249e786..5d1b7a4a84 100644 --- a/modules/space/translation/spicetranslation.cpp +++ b/modules/space/translation/spicetranslation.cpp @@ -107,21 +107,6 @@ SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary) { const Parameters p = codegen::bake(dictionary); - auto loadKernel = [](const std::string& kernel) { - if (!std::filesystem::is_regular_file(kernel)) { - throw SpiceManager::SpiceException(fmt::format( - "Kernel '{}' does not exist", kernel - )); - } - - try { - SpiceManager::ref().loadKernel(kernel); - } - catch (const SpiceManager::SpiceException& exception) { - LERRORC("SpiceEphemeris", exception.message); - } - }; - _target.onChange([this]() { _cachedTarget = _target; requireUpdate(); diff --git a/modules/spacecraftinstruments/util/hongkangparser.cpp b/modules/spacecraftinstruments/util/hongkangparser.cpp index 9024f434cc..ff51404e1b 100644 --- a/modules/spacecraftinstruments/util/hongkangparser.cpp +++ b/modules/spacecraftinstruments/util/hongkangparser.cpp @@ -132,7 +132,7 @@ bool HongKangParser::create() { const bool hasObserver = SpiceManager::ref().hasNaifId(_spacecraft); if (!hasObserver) { throw ghoul::RuntimeError( - fmt::format("SPICE has no observer: '{}' in kernel pool", _spacecraft), + fmt::format("SPICE has no observer '{}' in kernel pool", _spacecraft), "HongKangParser" ); } diff --git a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp index 326f45a92d..6d9cd3e3a5 100644 --- a/modules/spacecraftinstruments/util/instrumenttimesparser.cpp +++ b/modules/spacecraftinstruments/util/instrumenttimesparser.cpp @@ -72,7 +72,7 @@ InstrumentTimesParser::InstrumentTimesParser(std::string name, std::string seque bool InstrumentTimesParser::create() { std::filesystem::path sequenceDir = absPath(_fileName); if (!std::filesystem::is_directory(sequenceDir)) { - LERROR(fmt::format("Could not load Label Directory {}", sequenceDir)); + LERROR(fmt::format("Could not load label directory '{}'", sequenceDir)); return false; } @@ -84,7 +84,7 @@ bool InstrumentTimesParser::create() { std::filesystem::path filepath = sequenceDir / filename; if (!std::filesystem::is_regular_file(filepath)) { - LERROR(fmt::format("Unable to read file {}. Skipping file", filepath)); + LERROR(fmt::format("Unable to read file '{}'. Skipping file", filepath)); continue; } diff --git a/modules/spacecraftinstruments/util/labelparser.cpp b/modules/spacecraftinstruments/util/labelparser.cpp index b374ecbee5..e3a8b853d9 100644 --- a/modules/spacecraftinstruments/util/labelparser.cpp +++ b/modules/spacecraftinstruments/util/labelparser.cpp @@ -136,7 +136,7 @@ std::string LabelParser::encode(const std::string& line) const { bool LabelParser::create() { std::filesystem::path sequenceDir = absPath(_fileName); if (!std::filesystem::is_directory(sequenceDir)) { - LERROR(fmt::format("Could not load Label Directory {}", sequenceDir)); + LERROR(fmt::format("Could not load label directory '{}'", sequenceDir)); return false; } @@ -162,9 +162,7 @@ bool LabelParser::create() { std::ifstream file(path); if (!file.good()) { - LERROR(fmt::format( - "Failed to open label file {}", std::filesystem::path(path) - )); + LERROR(fmt::format("Failed to open label file '{}'", path)); return false; } @@ -248,7 +246,7 @@ bool LabelParser::create() { } else{ LERROR(fmt::format( - "Label file {} deviates from generic standard", path + "Label file '{}' deviates from generic standard", path )); LINFO( "Please make sure input data adheres to format from \ diff --git a/modules/spacecraftinstruments/util/projectioncomponent.cpp b/modules/spacecraftinstruments/util/projectioncomponent.cpp index 4945a52a48..4f9cf9e848 100644 --- a/modules/spacecraftinstruments/util/projectioncomponent.cpp +++ b/modules/spacecraftinstruments/util/projectioncomponent.cpp @@ -425,7 +425,7 @@ void ProjectionComponent::imageProjectBegin() { if (_textureSizeDirty) { glm::ivec2 size = _textureSize; - LDEBUG(fmt::format("Changing texture size to {}, {}", size.x, size.y)); + LDEBUG(fmt::format("Changing texture size to ({}, {})", size.x, size.y)); // If the texture size has changed, we have to allocate new memory and copy // the image texture to the new target @@ -900,7 +900,7 @@ std::shared_ptr ProjectionComponent::loadProjectionTextu } bool ProjectionComponent::generateProjectionLayerTexture(const glm::ivec2& size) { - LINFO(fmt::format("Creating projection texture of size '{}, {}'", size.x, size.y)); + LINFO(fmt::format("Creating projection texture of size ({}, {})", size.x, size.y)); using namespace ghoul::opengl; _projectionTexture = std::make_unique( @@ -939,7 +939,7 @@ bool ProjectionComponent::generateProjectionLayerTexture(const glm::ivec2& size) } bool ProjectionComponent::generateDepthTexture(const glm::ivec2& size) { - LINFO(fmt::format("Creating depth texture of size '{}, {}'", size.x, size.y)); + LINFO(fmt::format("Creating depth texture of size ({}, {})", size.x, size.y)); _shadowing.texture = std::make_unique( glm::uvec3(size, 1), diff --git a/modules/statemachine/src/statemachine.cpp b/modules/statemachine/src/statemachine.cpp index 48046a7884..033d63c5d1 100644 --- a/modules/statemachine/src/statemachine.cpp +++ b/modules/statemachine/src/statemachine.cpp @@ -203,7 +203,7 @@ void StateMachine::saveToDotFile(const std::string& filename) const { std::ofstream file(outputFile); if (!file.good()) { LERROR(fmt::format( - "Error opening file {} for saving state machine dot file", outputFile + "Error opening file '{}' for saving state machine dot file", outputFile )); return; } diff --git a/modules/statemachine/statemachinemodule_lua.inl b/modules/statemachine/statemachinemodule_lua.inl index bbe0778d0c..0a583bad8e 100644 --- a/modules/statemachine/statemachinemodule_lua.inl +++ b/modules/statemachine/statemachinemodule_lua.inl @@ -111,11 +111,14 @@ namespace { if (module->hasStateMachine()) { std::string currentState = module->currentState(); std::vector transitions = module->possibleTransitions(); - LINFOC("StateMachine", fmt::format( - "Currently in state: '{}'. Can transition to states: [ {} ]", - currentState, - ghoul::join(transitions, ",") - )); + LINFOC( + "StateMachine", + fmt::format( + "Currently in state: '{}'. Can transition to states: [ {} ]", + currentState, + ghoul::join(transitions, ",") + ) + ); } else { LINFOC("StateMachine", "No state machine has been created"); diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index 6c4c493d91..6153bc7f04 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -372,7 +372,7 @@ HttpSynchronization::trySyncFromUrl(std::string listUrl) { for (const std::unique_ptr& d : downloads) { d->wait(); if (!d->hasSucceeded()) { - LERROR(fmt::format("Error downloading file from URL {}", d->url())); + LERROR(fmt::format("Error downloading file from URL '{}'", d->url())); failed = true; continue; } @@ -391,7 +391,7 @@ HttpSynchronization::trySyncFromUrl(std::string listUrl) { std::error_code ec; std::filesystem::rename(tempName, originalName, ec); if (ec) { - LERROR(fmt::format("Error renaming {} to {}", tempName, originalName)); + LERROR(fmt::format("Error renaming '{}' to '{}'", tempName, originalName)); failed = true; } @@ -408,14 +408,14 @@ HttpSynchronization::trySyncFromUrl(std::string listUrl) { if (is64) { LERROR(fmt::format( - "Error while unzipping {}: Zip64 archives are not supported", source + "Error while unzipping '{}': Zip64 archives are not supported", source )); continue; } int ret = zip_extract(source.c_str(), dest.c_str(), nullptr, nullptr); if (ret != 0) { - LERROR(fmt::format("Error {} while unzipping {}", ret, source)); + LERROR(fmt::format("Error '{}' while unzipping '{}'", ret, source)); continue; } diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index c919736fa2..8c38ade41d 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -234,9 +234,7 @@ bool UrlSynchronization::isEachFileValid() { "{}: File is valid to {} but asset specifies SecondsUntilResync = {} " "Did you mean to re-download the file? If so, remove file from sync " "folder to resync", - _identifier, - fileIsValidToDate, - _secondsUntilResync + _identifier, fileIsValidToDate, _secondsUntilResync )); } @@ -313,7 +311,7 @@ bool UrlSynchronization::trySyncUrls() { std::filesystem::path destination = directory() / (_filename + ".tmp"); if (sizeData.find(url) != sizeData.end()) { - LWARNING(fmt::format("{}: Duplicate entry for {}", _identifier, url)); + LWARNING(fmt::format("{}: Duplicate entry for '{}'", _identifier, url)); continue; } @@ -362,7 +360,7 @@ bool UrlSynchronization::trySyncUrls() { d->wait(); if (!d->hasSucceeded()) { failed = true; - LERROR(fmt::format("Error downloading file from URL {}", d->url())); + LERROR(fmt::format("Error downloading file from URL: {}", d->url())); continue; } @@ -383,7 +381,7 @@ bool UrlSynchronization::trySyncUrls() { if (ec) { LERRORC( "URLSynchronization", - fmt::format("Error renaming file {} to {}", tempName, originalName) + fmt::format("Error renaming file '{}' to '{}'", tempName, originalName) ); failed = true; diff --git a/modules/video/src/videoplayer.cpp b/modules/video/src/videoplayer.cpp index 199864d63c..00715d24d2 100644 --- a/modules/video/src/videoplayer.cpp +++ b/modules/video/src/videoplayer.cpp @@ -166,7 +166,7 @@ void VideoPlayer::observePropertyMpv(MpvKey key) { void VideoPlayer::setPropertyStringMpv(const char* name, const char* value) { int result = mpv_set_property_string(_mpvHandle, name, value); if (!checkMpvError(result)) { - LWARNING(fmt::format("Error setting property {}", name)); + LWARNING(fmt::format("Error setting property '{}'", name)); } } @@ -226,7 +226,7 @@ void VideoPlayer::getPropertyAsyncMpv(MpvKey key) { formats[key] ); if (!checkMpvError(result)) { - LWARNING(fmt::format("Could not find property {}", keys[key])); + LWARNING(fmt::format("Could not find property '{}'", keys[key])); return; } } @@ -238,7 +238,7 @@ void VideoPlayer::commandAsyncMpv(const char* cmd[], MpvKey key) { cmd ); if (!checkMpvError(result)) { - LERROR(fmt::format("Could not execute command {}", keys[key])); + LERROR(fmt::format("Could not execute command '{}'", keys[key])); return; } } @@ -608,7 +608,7 @@ void VideoPlayer::handleMpvEvents() { // Validate reply with what we have stored MpvKey key = static_cast(event->reply_userdata); if (formats[key] != prop->format) { - LINFO(fmt::format("Wrong format for property {}", keys[key])); + LINFO(fmt::format("Wrong format for property '{}'", keys[key])); break; } getPropertyAsyncMpv(key); @@ -647,7 +647,7 @@ void VideoPlayer::handleMpvProperties(mpv_event* event) { int result = mpv_event_to_node(&node, event); if (!checkMpvError(result)) { LWARNING( - fmt::format("Error getting data from libmpv property {}", keys[key]) + fmt::format("Error getting data from libmpv property: {}", keys[key]) ); } } diff --git a/modules/vislab/rendering/renderabledistancelabel.cpp b/modules/vislab/rendering/renderabledistancelabel.cpp index bb056ed192..7ac3e98bc9 100644 --- a/modules/vislab/rendering/renderabledistancelabel.cpp +++ b/modules/vislab/rendering/renderabledistancelabel.cpp @@ -149,7 +149,7 @@ void RenderableDistanceLabel::update(const UpdateData&) { } else { LERROR(fmt::format( - "Could not find scene graph node {} or {}", + "Could not find scene graph node '{}' or '{}'", nodeline->start(), nodeline->end() )); } diff --git a/modules/volume/rawvolumewriter.inl b/modules/volume/rawvolumewriter.inl index bb13a83897..7b8c5091da 100644 --- a/modules/volume/rawvolumewriter.inl +++ b/modules/volume/rawvolumewriter.inl @@ -100,7 +100,7 @@ void RawVolumeWriter::write(const RawVolume& volume) { std::ofstream file(_path, std::ios::binary); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Could not create file {}", _path)); + throw ghoul::RuntimeError(fmt::format("Could not create file '{}'", _path)); } file.write(buffer, length); diff --git a/modules/volume/rendering/renderabletimevaryingvolume.cpp b/modules/volume/rendering/renderabletimevaryingvolume.cpp index d0265032d1..e16b7badda 100644 --- a/modules/volume/rendering/renderabletimevaryingvolume.cpp +++ b/modules/volume/rendering/renderabletimevaryingvolume.cpp @@ -232,7 +232,7 @@ void RenderableTimeVaryingVolume::initializeGL() { std::filesystem::path sequenceDir = absPath(_sourceDirectory); if (!std::filesystem::is_directory(sequenceDir)) { - LERROR(fmt::format("Could not load sequence directory {}", sequenceDir)); + LERROR(fmt::format("Could not load sequence directory '{}'", sequenceDir)); return; } diff --git a/modules/volume/tasks/generaterawvolumetask.cpp b/modules/volume/tasks/generaterawvolumetask.cpp index 5978b7de58..ee6078e4f3 100644 --- a/modules/volume/tasks/generaterawvolumetask.cpp +++ b/modules/volume/tasks/generaterawvolumetask.cpp @@ -91,8 +91,8 @@ std::string GenerateRawVolumeTask::description() { return fmt::format( "Generate a raw volume with dimenstions: ({}, {}, {}). For each cell, set the " "value by evaluating the lua function: `{}`, with three arguments (x, y, z) " - "ranging from ({}, {}, {}) to ({}, {}, {}). Write raw volume data into {} and " - "dictionary with metadata to {}", + "ranging from ({}, {}, {}) to ({}, {}, {}). Write raw volume data into '{}' and " + "dictionary with metadata to '{}'", _dimensions.x, _dimensions.y, _dimensions.z, _valueFunctionLua, _lowerDomainBound.x, _lowerDomainBound.y, _lowerDomainBound.z, _upperDomainBound.x, _upperDomainBound.y, _upperDomainBound.z, diff --git a/modules/webbrowser/src/browserinstance.cpp b/modules/webbrowser/src/browserinstance.cpp index 33da63a9da..30a4ca2925 100644 --- a/modules/webbrowser/src/browserinstance.cpp +++ b/modules/webbrowser/src/browserinstance.cpp @@ -90,7 +90,7 @@ void BrowserInstance::loadUrl(std::string url) { ghoul_assert(_isInitialized, "BrowserInstance should be initialized"); if (!url.empty()) { - LDEBUG(fmt::format("Loading URL: {}", url)); + LDEBUG(fmt::format("Loading URL '{}'", url)); CefString cefUrl = std::move(url); _browser->GetMainFrame()->LoadURL(cefUrl); } diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index 3a4675cbd3..bbbbf89f34 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -123,7 +123,7 @@ std::filesystem::path WebBrowserModule::findHelperExecutable() { std::filesystem::path execLocation = absPath("${BIN}/" + std::string(SubprocessPath)); if (!std::filesystem::is_regular_file(execLocation)) { LERROR(fmt::format( - "Could not find web helper executable at location: {}" , execLocation + "Could not find web helper executable at location: {}", execLocation )); } return execLocation; diff --git a/src/data/csvloader.cpp b/src/data/csvloader.cpp index 19e8600d40..538a71e419 100644 --- a/src/data/csvloader.cpp +++ b/src/data/csvloader.cpp @@ -79,7 +79,7 @@ Dataset loadCsvFile(std::filesystem::path filePath, std::optional s if (rows.size() < 2) { LWARNING(fmt::format( - "Error loading data file {}. No data items read", filePath + "Error loading data file '{}'. No data items read", filePath )); return Dataset(); } @@ -135,13 +135,11 @@ Dataset loadCsvFile(std::filesystem::path filePath, std::optional s if (xColumn < 0 || yColumn < 0 || zColumn < 0) { // One or more position columns weren't read LERROR(fmt::format( - "Error loading data file {}. Missing X, Y or Z position column", filePath + "Error loading data file '{}'. Missing X, Y or Z position column", filePath )); } - LINFO(fmt::format( - "Loading {} rows with {} columns", rows.size(), columns.size() - )); + LINFO(fmt::format("Loading {} rows with {} columns", rows.size(), columns.size())); ProgressBar progress = ProgressBar(static_cast(rows.size())); // Skip first row (column names) diff --git a/src/data/dataloader.cpp b/src/data/dataloader.cpp index 7234aaa613..8c55bc97c0 100644 --- a/src/data/dataloader.cpp +++ b/src/data/dataloader.cpp @@ -47,7 +47,7 @@ namespace { template void checkSize(U value, std::string_view message) { if (value > std::numeric_limits::max()) { - throw ghoul::RuntimeError(fmt::format("Error saving file: {}", message)); + throw ghoul::RuntimeError(fmt::format("Error saving file '{}'", message)); } } @@ -99,7 +99,7 @@ namespace { FileSys.cacheManager()->removeCacheFile(cached); } } - LINFOC("DataLoader", fmt::format("Loading file {}", filePath)); + LINFOC("DataLoader", fmt::format("Loading file '{}'", filePath)); T dataset = loadFunction(filePath, specs); if (!dataset.entries.empty()) { @@ -120,7 +120,7 @@ Dataset loadFile(std::filesystem::path path, std::optional specs) { std::ifstream file(path); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Failed to open data file {}", path)); + throw ghoul::RuntimeError(fmt::format("Failed to open data file '{}'", path)); } std::string extension = ghoul::toLowerCase(path.extension().string()); @@ -134,7 +134,7 @@ Dataset loadFile(std::filesystem::path path, std::optional specs) { } else { LERRORC("DataLoader", fmt::format( - "Could not read data file {}. File format {} is not supported", + "Could not read data file '{}'. File format '{}' is not supported", path, path.extension() )); } @@ -351,7 +351,7 @@ Labelset loadFile(std::filesystem::path path, std::optional) { std::ifstream file(path); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Failed to open dataset file {}", path)); + throw ghoul::RuntimeError(fmt::format("Failed to open dataset file '{}'", path)); } std::string extension = ghoul::toLowerCase(path.extension().string()); @@ -362,7 +362,7 @@ Labelset loadFile(std::filesystem::path path, std::optional) { } else { LERRORC("DataLoader", fmt::format( - "Could not read label data file {}. File format {} is not supported", + "Could not read label data file '{}'. File format '{}' is not supported", path, path.extension() )); } @@ -487,7 +487,7 @@ ColorMap loadFile(std::filesystem::path path, std::optional) { std::ifstream file(path); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Failed to open colormap file {}", path)); + throw ghoul::RuntimeError(fmt::format("Failed to open colormap file '{}'", path)); } std::string extension = ghoul::toLowerCase(path.extension().string()); @@ -498,7 +498,7 @@ ColorMap loadFile(std::filesystem::path path, std::optional) { } else { LERRORC("DataLoader", fmt::format( - "Could not read color map file {}. File format {} is not supported", + "Could not read color map file '{}'. File format '{}' is not supported", path, path.extension() )); } diff --git a/src/data/speckloader.cpp b/src/data/speckloader.cpp index dbe254135c..cf5180aa34 100644 --- a/src/data/speckloader.cpp +++ b/src/data/speckloader.cpp @@ -76,7 +76,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe std::ifstream file(path); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Failed to open speck file {}", path)); + throw ghoul::RuntimeError(fmt::format("Failed to open speck file '{}'", path)); } Dataset res; @@ -130,7 +130,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe // where is the data value index where the texture index is stored if (res.textureDataIndex != -1) { throw ghoul::RuntimeError(fmt::format( - "Error loading speck file {}: Texturevar defined twice", path + "Error loading speck file '{}': Texturevar defined twice", path )); } @@ -149,7 +149,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe if (res.orientationDataIndex != -1) { throw ghoul::RuntimeError(fmt::format( - "Error loading speck file {}: Orientation index defined twice", path + "Error loading speck file '{}': Orientation index defined twice", path )); } @@ -191,7 +191,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe for (const Dataset::Texture& t : res.textures) { if (t.index == texture.index) { throw ghoul::RuntimeError(fmt::format( - "Error loading speck file {}: Texture index '{}' defined twice", + "Error loading speck file '{}': Texture index '{}' defined twice", path, texture.index )); } @@ -210,7 +210,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe // didn't start with either '#' denoting a comment line, and didn't start with // either the 'datavar', 'texturevar', 'polyorivar', or 'texture' keywords throw ghoul::RuntimeError(fmt::format( - "Error in line {} while reading the header information of file {}. Line is " + "Error in line {} while reading the header information of file '{}'. Line is " "neither a comment line, nor starts with one of the supported keywords for " "SPECK files", currentLineNumber, path @@ -259,7 +259,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe // data section of the file if (!std::isdigit(line[0]) && line[0] != '-') { throw ghoul::RuntimeError(fmt::format( - "Error loading speck file {}: Header information and datasegment " + "Error loading speck file '{}': Header information and datasegment " "intermixed", path )); } @@ -283,7 +283,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe // Need to subtract one of the line number here as we increase the current // line count in the beginning of the while loop we are currently in throw ghoul::RuntimeError(fmt::format( - "Error loading position information out of data line {} in file {}. " + "Error loading position information out of data line {} in file '{}'. " "Value was not a number", currentLineNumber - 1, path )); @@ -317,7 +317,7 @@ Dataset loadSpeckFile(std::filesystem::path path, std::optional spe // current line count in the beginning of the while loop we are // currently in throw ghoul::RuntimeError(fmt::format( - "Error loading data value {} out of data line {} in file {}. " + "Error loading data value {} out of data line {} in file '{}'. " "Value was not a number", i, currentLineNumber - 1, path )); @@ -361,7 +361,7 @@ Labelset loadLabelFile(std::filesystem::path path) { std::ifstream file(path); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Failed to open dataset file {}", path)); + throw ghoul::RuntimeError(fmt::format("Failed to open dataset file '{}'", path)); } Labelset res; @@ -396,7 +396,7 @@ Labelset loadLabelFile(std::filesystem::path path) { // included in the speck file) if (res.textColorIndex != -1) { throw ghoul::RuntimeError(fmt::format( - "Error loading label file {}: Textcolor defined twice", path + "Error loading label file '{}': Textcolor defined twice", path )); } @@ -434,7 +434,7 @@ Labelset loadLabelFile(std::filesystem::path path) { // data section of the file if (!std::isdigit(line[0]) && line[0] != '-') { throw ghoul::RuntimeError(fmt::format( - "Error loading label file {}: Header information and datasegment " + "Error loading label file '{}': Header information and datasegment " "intermixed", path )); } @@ -463,7 +463,7 @@ Labelset loadLabelFile(std::filesystem::path path) { } if (!startsWith(rest, "text")) { throw ghoul::RuntimeError(fmt::format( - "Error loading label file {}: File contains an unsupported value " + "Error loading label file '{}': File contains an unsupported value " "between positions and text label", path )); } @@ -495,7 +495,9 @@ ColorMap loadCmapFile(std::filesystem::path path) { std::ifstream file(path); if (!file.good()) { - throw ghoul::RuntimeError(fmt::format("Failed to open color map file {}", path)); + throw ghoul::RuntimeError(fmt::format( + "Failed to open color map file '{}'", path + )); } ColorMap res; diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index 199688c40f..db3b36867f 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -227,7 +227,7 @@ std::future DownloadManager::fetchFile( SuccessCallback successCallback, ErrorCallback errorCallback) { - LDEBUG(fmt::format("Start downloading file: '{}' into memory", url)); + LDEBUG(fmt::format("Start downloading file '{}' into memory", url)); auto downloadFunction = [url, successCb = std::move(successCallback), errorCb = std::move(errorCallback)]() diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 39954093d1..f0d44b83be 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -230,7 +230,7 @@ void OpenSpaceEngine::registerPathTokens() { using T = std::string; for (const std::pair& path : global::configuration->pathTokens) { std::string fullKey = "${" + path.first + "}"; - LDEBUG(fmt::format("Registering path '{}': '{}'", fullKey, path.second)); + LDEBUG(fmt::format("Registering path '{}': {}", fullKey, path.second)); const bool overrideBase = (fullKey == "${BASE}"); if (overrideBase) { @@ -502,9 +502,9 @@ void OpenSpaceEngine::initializeGL() { for (const std::string& ext : m->requiredOpenGLExtensions()) { if (!SysCap.component().isExtensionSupported(ext)) { LFATAL(fmt::format( - "Module {} required OpenGL extension {} which is not available " - "on this system. Some functionality related to this module will " - "probably not work", + "Module '{}' required OpenGL extension '{}' which is not " + "available on this system. Some functionality related to this " + "module will probably not work", m->guiName(), ext )); } @@ -639,27 +639,27 @@ void OpenSpaceEngine::initializeGL() { case GL_INVALID_ENUM: LERRORC( "OpenGL Invalid State", - fmt::format("Function {}: GL_INVALID_ENUM", f.function->name()) + fmt::format("Function '{}': GL_INVALID_ENUM", f.function->name()) ); break; case GL_INVALID_VALUE: LERRORC( "OpenGL Invalid State", - fmt::format("Function {}: GL_INVALID_VALUE", f.function->name()) + fmt::format("Function '{}': GL_INVALID_VALUE", f.function->name()) ); break; case GL_INVALID_OPERATION: LERRORC( "OpenGL Invalid State", fmt::format( - "Function {}: GL_INVALID_OPERATION", f.function->name() + "Function '{}': GL_INVALID_OPERATION", f.function->name() )); break; case GL_INVALID_FRAMEBUFFER_OPERATION: LERRORC( "OpenGL Invalid State", fmt::format( - "Function {}: GL_INVALID_FRAMEBUFFER_OPERATION", + "Function '{}': GL_INVALID_FRAMEBUFFER_OPERATION", f.function->name() ) ); @@ -667,7 +667,7 @@ void OpenSpaceEngine::initializeGL() { case GL_OUT_OF_MEMORY: LERRORC( "OpenGL Invalid State", - fmt::format("Function {}: GL_OUT_OF_MEMORY", f.function->name()) + fmt::format("Function '{}': GL_OUT_OF_MEMORY", f.function->name()) ); break; default: @@ -924,15 +924,17 @@ void OpenSpaceEngine::loadFonts() { std::filesystem::path fontName = absPath(font.second); if (!std::filesystem::is_regular_file(fontName)) { - LERROR(fmt::format("Could not find font {} for key '{}'", fontName, key)); + LERROR(fmt::format("Could not find font '{}' for key '{}'", fontName, key)); continue; } - LDEBUG(fmt::format("Registering font {} with key '{}'", fontName, key)); + LDEBUG(fmt::format("Registering font '{}' with key '{}'", fontName, key)); bool success = global::fontManager->registerFontPath(key, fontName); if (!success) { - LERROR(fmt::format("Error registering font {} with key '{}'", fontName, key)); + LERROR(fmt::format( + "Error registering font '{}' with key '{}'", fontName, key + )); } } @@ -1518,7 +1520,7 @@ bool OpenSpaceEngine::setMode(Mode newMode) { void OpenSpaceEngine::resetMode() { _currentMode = Mode::UserControl; - LDEBUG(fmt::format("Reset engine mode to {}", stringify(_currentMode))); + LDEBUG(fmt::format("Reset engine mode to '{}'", stringify(_currentMode))); } OpenSpaceEngine::CallbackHandle OpenSpaceEngine::addModeChangeCallback( @@ -1702,7 +1704,7 @@ void setActionsFromProfile(const Profile& p) { } if (a.script.empty()) { LERROR(fmt::format( - "Identifier '{}' doesn't provide a Lua command to execute", a.identifier + "Identifier '{}' does not provide a Lua command to execute", a.identifier )); } interaction::Action action; diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 4cb9164e0d..d1aafdb5a6 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -90,7 +90,7 @@ namespace { { using namespace openspace; - LINFOC("OpenSpaceEngine", fmt::format("Downloading file from {}", url)); + LINFOC("OpenSpaceEngine", fmt::format("Downloading file from '{}'", url)); std::shared_ptr future = global::downloadManager->downloadFile( url, @@ -103,7 +103,7 @@ namespace { if (waitForCompletion) { while (!future->isFinished && future->errorMessage.empty()) { // just wait - LTRACEC("OpenSpaceEngine", fmt::format("waiting {}", future->errorMessage)); + LTRACEC("OpenSpaceEngine", fmt::format("waiting '{}'", future->errorMessage)); } } } @@ -220,7 +220,7 @@ namespace { bool includeFirstLine = false) { if (!std::filesystem::exists(file) || !std::filesystem::is_regular_file(file)) { - throw ghoul::lua::LuaError(fmt::format("Could not find file {}", file)); + throw ghoul::lua::LuaError(fmt::format("Could not find file '{}'", file)); } std::vector> res = @@ -258,7 +258,7 @@ namespace { */ [[codegen::luawrap]] ghoul::Dictionary loadJson(std::filesystem::path path) { if (!std::filesystem::exists(path)) { - throw ghoul::RuntimeError(fmt::format("File {} did not exist", path)); + throw ghoul::RuntimeError(fmt::format("File '{}' did not exist", path)); } std::ifstream f(path); diff --git a/src/engine/settings.cpp b/src/engine/settings.cpp index 90feb2bf1f..111c54a8a1 100644 --- a/src/engine/settings.cpp +++ b/src/engine/settings.cpp @@ -69,7 +69,7 @@ namespace version1 { } else { throw ghoul::RuntimeError(fmt::format( - "Unknown visibility value {}", *visibility + "Unknown visibility value '{}'", *visibility )); } } diff --git a/src/events/eventengine.cpp b/src/events/eventengine.cpp index 4a5ea3589f..d52842b6ed 100644 --- a/src/events/eventengine.cpp +++ b/src/events/eventengine.cpp @@ -125,7 +125,7 @@ void EventEngine::unregisterEventAction(uint32_t identifier) { // If we get this far, we haven't found the identifier throw ghoul::RuntimeError(fmt::format( - "Could not find event with identifier {}", identifier + "Could not find event with identifier '{}'", identifier )); } diff --git a/src/interaction/joystickcamerastates.cpp b/src/interaction/joystickcamerastates.cpp index 2f4694d35c..b8d34f2278 100644 --- a/src/interaction/joystickcamerastates.cpp +++ b/src/interaction/joystickcamerastates.cpp @@ -436,8 +436,10 @@ JoystickCameraStates::findOrAddJoystickCameraState(const std::string& joystickNa joystick->joystickName = joystickName; } else { - LWARNING(fmt::format("Cannot add more joysticks, only {} joysticks are " - "supported", JoystickInputStates::MaxNumJoysticks)); + LWARNING(fmt::format( + "Cannot add more joysticks, only {} joysticks are supported", + JoystickInputStates::MaxNumJoysticks + )); return nullptr; } } diff --git a/src/interaction/sessionrecording.cpp b/src/interaction/sessionrecording.cpp index 9cb631505c..057eae02c7 100644 --- a/src/interaction/sessionrecording.cpp +++ b/src/interaction/sessionrecording.cpp @@ -185,7 +185,7 @@ bool SessionRecording::handleRecordingFile(std::string filenameIn) { if (std::filesystem::is_regular_file(absFilename)) { LERROR(fmt::format( - "Unable to start recording; file {} already exists", absFilename + "Unable to start recording; file '{}' already exists", absFilename )); return false; } @@ -197,7 +197,9 @@ bool SessionRecording::handleRecordingFile(std::string filenameIn) { } if (!_recordFile.is_open() || !_recordFile.good()) { - LERROR(fmt::format("Unable to open file {} for keyframe recording", absFilename)); + LERROR(fmt::format( + "Unable to open file '{}' for keyframe recording", absFilename + )); return false; } return true; @@ -426,7 +428,7 @@ bool SessionRecording::startPlayback(std::string& filename, if (!_playbackFile.is_open() || !_playbackFile.good()) { LERROR(fmt::format( - "Unable to open file {} for keyframe playback", absFilename.c_str() + "Unable to open file '{}' for keyframe playback", absFilename.c_str() )); stopPlayback(); cleanUpPlayback(); @@ -1084,7 +1086,7 @@ bool SessionRecording::playbackAddEntriesToTimeline() { // Check if have reached EOF if (!_playbackFile) { LINFO(fmt::format( - "Finished parsing {} entries from playback file {}", + "Finished parsing {} entries from playback file '{}'", _playbackLineNum - 1, _playbackFilename )); break; @@ -1100,7 +1102,7 @@ bool SessionRecording::playbackAddEntriesToTimeline() { } else { LERROR(fmt::format( - "Unknown frame type {} @ index {} of playback file {}", + "Unknown frame type {} @ index {} of playback file '{}'", frameType, _playbackLineNum - 1, _playbackFilename )); parsingStatusOk = false; @@ -1118,7 +1120,7 @@ bool SessionRecording::playbackAddEntriesToTimeline() { std::string entryType; if (!(iss >> entryType)) { LERROR(fmt::format( - "Error reading entry type @ line {} of playback file {}", + "Error reading entry type @ line {} of playback file '{}'", _playbackLineNum, _playbackFilename )); break; @@ -1138,7 +1140,7 @@ bool SessionRecording::playbackAddEntriesToTimeline() { } else { LERROR(fmt::format( - "Unknown frame type {} @ line {} of playback file {}", + "Unknown frame type {} @ line {} of playback file '{}'", entryType, _playbackLineNum, _playbackFilename )); parsingStatusOk = false; @@ -1146,7 +1148,7 @@ bool SessionRecording::playbackAddEntriesToTimeline() { } } LINFO(fmt::format( - "Finished parsing {} entries from playback file {}", + "Finished parsing {} entries from playback file '{}'", _playbackLineNum, _playbackFilename )); } @@ -1567,8 +1569,8 @@ void SessionRecording::checkIfScriptUsesScenegraphNode(std::string s) { std::find(_loadedNodes.begin(), _loadedNodes.end(), navNode); if (it == _loadedNodes.end()) { LWARNING(fmt::format( - "Playback file contains a property setting of navigation using" - " scenegraph node '{}', which is not currently loaded", navNode + "Playback file contains a property setting of navigation using " + "scenegraph node '{}', which is not currently loaded", navNode )); } } @@ -1582,8 +1584,8 @@ void SessionRecording::checkIfScriptUsesScenegraphNode(std::string s) { ); if (matchHits.empty()) { LWARNING(fmt::format( - "Playback file contains a property setting of scenegraph" - " node '{}', which is not currently loaded", found + "Playback file contains a property setting of scenegraph " + "node '{}', which is not currently loaded", found )); } } @@ -1780,14 +1782,11 @@ bool SessionRecording::readScriptKeyframeAscii(Timestamps& times, iss >> times.timeOs >> times.timeRec >> times.timeSim; kf.read(iss); if (iss.fail()) { - LERROR(fmt::format( - "Error parsing script line {} of playback file", lineN - )); + LERROR(fmt::format("Error parsing script line {} of playback file", lineN)); return false; - } else if (!iss.eof()) { - LERROR(fmt::format( - "Did not find an EOL at line {} of playback file", lineN - )); + } + else if (!iss.eof()) { + LERROR(fmt::format("Did not find an EOL at line {} of playback file", lineN)); return false; } return true; @@ -2296,7 +2295,8 @@ void SessionRecording::readFileIntoStringStream(std::string filename, std::filesystem::path conversionInFilename = absPath(filename); if (!std::filesystem::is_regular_file(conversionInFilename)) { throw ConversionError(fmt::format( - "Cannot find the specified playback file {} to convert", conversionInFilename + "Cannot find the specified playback file '{}' to convert", + conversionInFilename )); } @@ -2314,7 +2314,7 @@ void SessionRecording::readFileIntoStringStream(std::string filename, stream << inputFstream.rdbuf(); if (!inputFstream.is_open() || !inputFstream.good()) { throw ConversionError(fmt::format( - "Unable to open file {} for conversion", filename.c_str() + "Unable to open file '{}' for conversion", filename )); } inputFstream.close(); @@ -2365,8 +2365,8 @@ std::string SessionRecording::convertFile(std::string filename, int depth) { if (depth != 0) { conversionOutFilename = determineConversionOutFilename(filename, mode); LINFO(fmt::format( - "Starting conversion on rec file {}, version {} in {} mode. " - "Writing result to {}", + "Starting conversion on rec file '{}', version {} in {} mode. " + "Writing result to '{}'", newFilename, fileVersion, (mode == DataMode::Ascii) ? "ascii" : "binary", conversionOutFilename )); @@ -2379,8 +2379,8 @@ std::string SessionRecording::convertFile(std::string filename, int depth) { } if (!conversionOutFile.is_open() || !conversionOutFile.good()) { LERROR(fmt::format( - "Unable to open file {} for conversion result", - conversionOutFilename.c_str() + "Unable to open file '{}' for conversion result", + conversionOutFilename )); return ""; } @@ -2432,7 +2432,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, // Check if have reached EOF if (!inStream) { LINFO(fmt::format( - "Finished converting {} entries from playback file {}", + "Finished converting {} entries from playback file '{}'", lineNum - 1, inFilename )); break; @@ -2475,7 +2475,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, } else { LERROR(fmt::format( - "Unknown frame type {} @ index {} of conversion file {}", + "Unknown frame type {} @ index {} of conversion file '{}'", frameType, lineNum - 1, inFilename )); conversionStatusOk = false; @@ -2491,7 +2491,7 @@ bool SessionRecording::convertEntries(std::string& inFilename, std::string entryType; if (!(iss >> entryType)) { LERROR(fmt::format( - "Error reading entry type @ line {} of conversion file {}", + "Error reading entry type @ line {} of conversion file '{}'", lineNum, inFilename )); break; @@ -2538,14 +2538,14 @@ bool SessionRecording::convertEntries(std::string& inFilename, } else { LERROR(fmt::format( - "Unknown frame type {} @ line {} of conversion file {}", + "Unknown frame type {} @ line {} of conversion file '{}'", entryType, lineNum, inFilename )); conversionStatusOk = false; } } LINFO(fmt::format( - "Finished parsing {} entries from conversion file {}", + "Finished parsing {} entries from conversion file '{}'", lineNum, inFilename )); } @@ -2564,7 +2564,7 @@ std::string SessionRecording_legacy_0085::getLegacyConversionResult(std::string // as the oldest supported legacy version. LERROR(fmt::format( "Version 00.85 is the oldest supported legacy file format; no conversion " - "can be made. It is possible that file {} has a corrupted header or an invalid " + "can be made. It is possible that file '{}' has a corrupted header or an invalid " "file format version number", filename )); diff --git a/src/interaction/tasks/convertrecfileversiontask.cpp b/src/interaction/tasks/convertrecfileversiontask.cpp index 0ecf27d203..d17a229217 100644 --- a/src/interaction/tasks/convertrecfileversiontask.cpp +++ b/src/interaction/tasks/convertrecfileversiontask.cpp @@ -69,7 +69,7 @@ ConvertRecFileVersionTask::~ConvertRecFileVersionTask() { std::string ConvertRecFileVersionTask::description() { std::string description = fmt::format( - "Convert file format of session recording file {} to current version", + "Convert file format of session recording file '{}' to current version", _inFilePath ); return description; @@ -90,7 +90,7 @@ void ConvertRecFileVersionTask::convert() { ); if (!hasBinaryFileExtension && !hasAsciiFileExtension) { LERROR(fmt::format( - "Input filename does not have expected {} or {} extension", + "Input filename does not have expected '{}' or '{}' extension", SessionRecording::FileExtensionBinary, SessionRecording::FileExtensionAscii )); return; diff --git a/src/interaction/tasks/convertrecformattask.cpp b/src/interaction/tasks/convertrecformattask.cpp index b5a95c70a9..09323a4515 100644 --- a/src/interaction/tasks/convertrecformattask.cpp +++ b/src/interaction/tasks/convertrecformattask.cpp @@ -73,7 +73,7 @@ ConvertRecFormatTask::~ConvertRecFormatTask() { std::string ConvertRecFormatTask::description() { std::string description = - fmt::format("Convert session recording file {}", _inFilePath); + fmt::format("Convert session recording file '{}'", _inFilePath); if (_fileFormatType == SessionRecording::DataMode::Ascii) { description += "(ascii format) "; } @@ -83,7 +83,7 @@ std::string ConvertRecFormatTask::description() { else { description += "(UNKNOWN format) "; } - description += fmt::format("conversion to file {}", _outFilePath); + description += fmt::format("conversion to file '{}'", _outFilePath); return description; } @@ -107,12 +107,13 @@ void ConvertRecFormatTask::convert() { if (_inFilePath.extension() != expectedFileExtension_in) { LWARNING(fmt::format( - "Input filename doesn't have expected {} format file extension", currentFormat + "Input filename doesn't have expected '{}' format file extension", + currentFormat )); } if (_outFilePath.extension() == expectedFileExtension_in) { LERROR(fmt::format( - "Output filename has {} file extension, but is conversion from {}", + "Output filename has '{}' file extension, but is conversion from '{}'", currentFormat, currentFormat )); return; @@ -162,7 +163,7 @@ void ConvertRecFormatTask::determineFormatType() { != SessionRecording::FileHeaderTitle) { LERROR(fmt::format( - "Session recording file {} does not have expected header", _inFilePath + "Session recording file '{}' does not have expected header", _inFilePath )); } else { @@ -198,7 +199,7 @@ void ConvertRecFormatTask::convertToAscii() { // Check if have reached EOF if (!_iFile) { LINFO(fmt::format( - "Finished converting {} entries from file {}", lineNum - 1, _inFilePath + "Finished converting {} entries from file '{}'", lineNum - 1, _inFilePath )); fileReadOk = false; break; @@ -227,7 +228,7 @@ void ConvertRecFormatTask::convertToAscii() { } else { LERROR(fmt::format( - "Unknown frame type @ index {} of playback file {}", + "Unknown frame type @ index {} of playback file '{}'", lineNum - 1, _inFilePath )); break; @@ -259,7 +260,7 @@ void ConvertRecFormatTask::convertToBinary() { std::string entryType; if (!(iss >> entryType)) { LERROR(fmt::format( - "Error reading entry type @ line {} of file {}", lineNum, _inFilePath + "Error reading entry type @ line {} of file '{}'", lineNum, _inFilePath )); break; } @@ -284,7 +285,7 @@ void ConvertRecFormatTask::convertToBinary() { } else { LERROR(fmt::format( - "Unknown frame type {} @ line {} of file {}", + "Unknown frame type {} @ line {} of file '{}'", entryType, lineContents, _inFilePath )); break; @@ -292,7 +293,7 @@ void ConvertRecFormatTask::convertToBinary() { } _oFile.close(); LINFO(fmt::format( - "Finished converting {} entries from file {}", lineNum, _inFilePath + "Finished converting {} entries from file '{}'", lineNum, _inFilePath )); } diff --git a/src/navigation/navigationhandler.cpp b/src/navigation/navigationhandler.cpp index de63360dfb..a45ceb3b27 100644 --- a/src/navigation/navigationhandler.cpp +++ b/src/navigation/navigationhandler.cpp @@ -567,7 +567,7 @@ void NavigationHandler::saveNavigationState(const std::filesystem::path& filepat if (!ofs.good()) { throw ghoul::RuntimeError(fmt::format( - "Error saving navigation state to {}", filepath + "Error saving navigation state to '{}'", filepath )); } diff --git a/src/navigation/orbitalnavigator.cpp b/src/navigation/orbitalnavigator.cpp index 268acbebd2..f8b75006de 100644 --- a/src/navigation/orbitalnavigator.cpp +++ b/src/navigation/orbitalnavigator.cpp @@ -534,7 +534,7 @@ OrbitalNavigator::OrbitalNavigator() } else { LERROR(fmt::format( - "No scenegraph node with identifier {} exists", _anchor.value() + "No scenegraph node with identifier '{}' exists", _anchor.value() )); } }); @@ -550,7 +550,7 @@ OrbitalNavigator::OrbitalNavigator() } else { LERROR(fmt::format( - "No scenegraph node with identifier {} exists", _aim.value() + "No scenegraph node with identifier '{}' exists", _aim.value() )); } }); diff --git a/src/network/parallelpeer.cpp b/src/network/parallelpeer.cpp index a4c156eeaf..988ec47d1d 100644 --- a/src/network/parallelpeer.cpp +++ b/src/network/parallelpeer.cpp @@ -403,7 +403,8 @@ void ParallelPeer::dataMessageReceived(const std::vector& message) { } default: LERROR(fmt::format( - "Unidentified message with identifier {} received in parallel connection", + "Unidentified message with identifier '{}' received in parallel " + "connection", type )); break; diff --git a/src/properties/scalar/intproperty.cpp b/src/properties/scalar/intproperty.cpp index 9f40b17364..af10f72e5d 100644 --- a/src/properties/scalar/intproperty.cpp +++ b/src/properties/scalar/intproperty.cpp @@ -49,7 +49,7 @@ int IntProperty::fromLuaConversion(lua_State* state) const { return ghoul::lua::value(state); } else { - throw ghoul::RuntimeError(fmt::format("Error extracting value in IntProperty")); + throw ghoul::RuntimeError("Error extracting value in IntProperty"); } } diff --git a/src/properties/scalar/uintproperty.cpp b/src/properties/scalar/uintproperty.cpp index e46c829520..03b454604c 100644 --- a/src/properties/scalar/uintproperty.cpp +++ b/src/properties/scalar/uintproperty.cpp @@ -56,7 +56,7 @@ unsigned int UIntProperty::fromLuaConversion(lua_State* state) const { return ghoul::lua::value(state); } else { - throw ghoul::RuntimeError(fmt::format("Error extracting value in UIntProperty")); + throw ghoul::RuntimeError("Error extracting value in UIntProperty"); } } diff --git a/src/rendering/colormappingcomponent.cpp b/src/rendering/colormappingcomponent.cpp index 5e2be4f0d6..0300b296a8 100644 --- a/src/rendering/colormappingcomponent.cpp +++ b/src/rendering/colormappingcomponent.cpp @@ -242,7 +242,7 @@ ColorMappingComponent::ColorMappingComponent() colorMapFile.onChange([this]() { bool fileExists = std::filesystem::exists(colorMapFile.value()); if (!fileExists) { - LERROR(fmt::format("Could not find cmap file: '{}'", colorMapFile.value())); + LERROR(fmt::format("Could not find cmap file: {}", colorMapFile.value())); } _colorMapFileIsDirty = true; }); diff --git a/src/rendering/labelscomponent.cpp b/src/rendering/labelscomponent.cpp index 8e6fe2b92c..e8320cffe7 100644 --- a/src/rendering/labelscomponent.cpp +++ b/src/rendering/labelscomponent.cpp @@ -258,7 +258,7 @@ void LabelsComponent::initialize() { } void LabelsComponent::loadLabels() { - LINFO(fmt::format("Loading label file {}", _labelFile)); + LINFO(fmt::format("Loading label file '{}'", _labelFile)); if (_createdFromDataset) { // The labelset should already have been loaded diff --git a/src/rendering/texturecomponent.cpp b/src/rendering/texturecomponent.cpp index f66337a530..4a7ed293ab 100644 --- a/src/rendering/texturecomponent.cpp +++ b/src/rendering/texturecomponent.cpp @@ -99,7 +99,7 @@ void TextureComponent::loadFromFile(const std::filesystem::path& path) { ); if (texture) { - LDEBUG(fmt::format("Loaded texture from {}", absolutePath)); + LDEBUG(fmt::format("Loaded texture from '{}'", absolutePath)); _texture = std::move(texture); _textureFile = std::make_unique(absolutePath); diff --git a/src/scene/asset.cpp b/src/scene/asset.cpp index 42095a7e1d..08fe0884ec 100644 --- a/src/scene/asset.cpp +++ b/src/scene/asset.cpp @@ -279,10 +279,10 @@ void Asset::initialize() { return; } if (!isSynchronized()) { - LERROR(fmt::format("Cannot initialize unsynchronized asset {}", _assetPath)); + LERROR(fmt::format("Cannot initialize unsynchronized asset '{}'", _assetPath)); return; } - LDEBUG(fmt::format("Initializing asset {}", _assetPath)); + LDEBUG(fmt::format("Initializing asset '{}'", _assetPath)); // 1. Initialize requirements for (Asset* child : _requiredAssets) { @@ -294,13 +294,13 @@ void Asset::initialize() { _manager.callOnInitialize(this); } catch (const documentation::SpecificationError& e) { - LERROR(fmt::format("Failed to initialize asset {}", path())); + LERROR(fmt::format("Failed to initialize asset '{}'", path())); documentation::logError(e); setState(State::InitializationFailed); return; } catch (const ghoul::RuntimeError& e) { - LERROR(fmt::format("Failed to initialize asset {}", path())); + LERROR(fmt::format("Failed to initialize asset '{}'", path())); LERROR(fmt::format("{}: {}", e.component, e.message)); setState(State::InitializationFailed); return; @@ -314,7 +314,7 @@ void Asset::deinitialize() { if (!isInitialized()) { return; } - LDEBUG(fmt::format("Deinitializing asset {}", _assetPath)); + LDEBUG(fmt::format("Deinitializing asset '{}'", _assetPath)); // Perform inverse actions as in initialize, in reverse order (3 - 1) @@ -326,7 +326,7 @@ void Asset::deinitialize() { _manager.callOnDeinitialize(this); } catch (const ghoul::lua::LuaRuntimeException& e) { - LERROR(fmt::format("Failed to deinitialize asset {}", _assetPath)); + LERROR(fmt::format("Failed to deinitialize asset '{}'", _assetPath)); LERROR(fmt::format("{}: {}", e.component, e.message)); return; } diff --git a/src/scene/assetmanager.cpp b/src/scene/assetmanager.cpp index 31d63e755b..02776a1a4b 100644 --- a/src/scene/assetmanager.cpp +++ b/src/scene/assetmanager.cpp @@ -238,7 +238,7 @@ void AssetManager::update() { [&path](const std::unique_ptr& a) { return a->path() == path; } ); if (it == _assets.cend()) { - LWARNING(fmt::format("Tried to remove unknown asset {}. Skipping", asset)); + LWARNING(fmt::format("Tried to remove unknown asset '{}'. Skipping", asset)); continue; } @@ -363,7 +363,7 @@ bool AssetManager::loadAsset(Asset* asset, Asset* parent) { if (!std::filesystem::is_regular_file(asset->path())) { LERROR(fmt::format( - "Could not load asset {}: File does not exist", asset->path()) + "Could not load asset '{}': File does not exist", asset->path()) ); return false; } @@ -372,7 +372,7 @@ bool AssetManager::loadAsset(Asset* asset, Asset* parent) { ghoul::lua::runScriptFile(*_luaState, asset->path()); } catch (const ghoul::lua::LuaRuntimeException& e) { - LERROR(fmt::format("Could not load asset {}: {}", asset->path(), e.message)); + LERROR(fmt::format("Could not load asset '{}': {}", asset->path(), e.message)); return false; } catch (const ghoul::RuntimeError& e) { @@ -915,7 +915,7 @@ Asset* AssetManager::retrieveAsset(const std::filesystem::path& path, if (!std::filesystem::is_regular_file(path)) { throw ghoul::RuntimeError(fmt::format( - "Could not find asset file {} requested by {}", + "Could not find asset file '{}' requested by '{}'", path, retriever )); } @@ -939,7 +939,7 @@ void AssetManager::callOnInitialize(Asset* asset) const { lua_rawgeti(*_luaState, LUA_REGISTRYINDEX, init); if (lua_pcall(*_luaState, 0, 0, 0) != LUA_OK) { throw ghoul::lua::LuaRuntimeException(fmt::format( - "When initializing {}: {}", + "When initializing '{}': {}", asset->path(), ghoul::lua::value(*_luaState, -1) )); @@ -962,7 +962,7 @@ void AssetManager::callOnDeinitialize(Asset* asset) const { lua_rawgeti(*_luaState, LUA_REGISTRYINDEX, deinit); if (lua_pcall(*_luaState, 0, 0, 0) != LUA_OK) { throw ghoul::lua::LuaRuntimeException(fmt::format( - "When deinitializing {}: {}", + "When deinitializing '{}': {}", asset->path(), ghoul::lua::value(*_luaState, -1) )); diff --git a/src/scene/profile.cpp b/src/scene/profile.cpp index 02f6216b59..cc7b42e131 100644 --- a/src/scene/profile.cpp +++ b/src/scene/profile.cpp @@ -750,7 +750,7 @@ Profile::Profile(const std::filesystem::path& path) { } catch (const std::ifstream::failure& e) { throw ghoul::RuntimeError(fmt::format( - "Exception opening profile file for read: {} ({})", path, e.what() + "Exception opening profile file for read '{}': {}", path, e.what() )); } diff --git a/src/scene/profile_lua.inl b/src/scene/profile_lua.inl index f006c6de3c..358fa66750 100644 --- a/src/scene/profile_lua.inl +++ b/src/scene/profile_lua.inl @@ -69,7 +69,10 @@ namespace { absPath("${USER_PROFILES}").string(), global::configuration->profile ); } - LINFOC("Profile", fmt::format("Saving a copy of the old profile as {}", newFile)); + LINFOC( + "Profile", + fmt::format("Saving a copy of the old profile as '{}'", newFile) + ); std::filesystem::copy(sourcePath, destPath); saveFilePath = global::configuration->profile; } @@ -119,7 +122,7 @@ namespace { catch (const std::ofstream::failure& e) { throw ghoul::lua::LuaError( fmt::format( - "Exception opening profile file for write: {} ({})", absFilename, e.what() + "Exception opening profile file for write '{}': {}", absFilename, e.what() ) ); } @@ -129,7 +132,7 @@ namespace { } catch (const std::ofstream::failure& e) { throw ghoul::lua::LuaError( - fmt::format("Data write error to file: {} ({})", absFilename, e.what()) + fmt::format("Data write error to file '{}': {}", absFilename, e.what()) ); } } diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 81e5fe275c..4b281d174f 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -679,7 +679,7 @@ void Scene::handlePropertyLuaTableEntry(ghoul::lua::LuaState& L, const std::stri switch (enclosedType) { case PropertyValueType::Boolean: LERROR(fmt::format( - "A lua table of bool values is not supported. (processing property {})", + "A Lua table of bool values is not supported. (processing property '{}')", _profilePropertyName )); break; @@ -701,7 +701,7 @@ void Scene::handlePropertyLuaTableEntry(ghoul::lua::LuaState& L, const std::stri default: LERROR(fmt::format( "Table-within-a-table values are not supported for profile a " - "property (processing property {})", _profilePropertyName + "property (processing property '{}')", _profilePropertyName )); break; } @@ -730,8 +730,8 @@ void Scene::processPropertyValueTableEntries(ghoul::lua::LuaState& L, } catch (std::bad_variant_access&) { LERROR(fmt::format( - "Error attempting to parse profile property setting for " - "{} using value = {}", _profilePropertyName, value + "Error attempting to parse profile property setting for '{}' using " + "value = {}", _profilePropertyName, value )); } } diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 5241f7b2f1..41a22f49fe 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -226,7 +226,7 @@ void applyRegularExpression(lua_State* L, const std::string& regex, "property_setValue", fmt::format( "{}: Property '{}' does not accept input of type '{}'. Requested " - "type: '{}'", + "type: {}", errorLocation(L), prop->fullyQualifiedIdentifier(), luaTypeToString(type), luaTypeToString(prop->typeLua()) ) @@ -305,7 +305,7 @@ int setPropertyCallSingle(properties::Property& prop, const std::string& uri, "property_setValue", fmt::format( "{}: Property '{}' does not accept input of type '{}'. " - "Requested type: '{}'", + "Requested type: {}", errorLocation(L), uri, luaTypeToString(type), luaTypeToString(prop.typeLua()) ) @@ -364,7 +364,7 @@ int propertySetValue(lua_State* L) { } else { std::string msg = fmt::format( - "Unexpected type {} in argument 3", + "Unexpected type '{}' in argument 3", ghoul::lua::luaTypeToString(lua_type(L, 3)) ); return ghoul::lua::luaError(L, msg); @@ -377,7 +377,7 @@ int propertySetValue(lua_State* L) { } else { std::string msg = fmt::format( - "Unexpected type {} in argument 4", + "Unexpected type '{}' in argument 4", ghoul::lua::luaTypeToString(lua_type(L, 4)) ); return ghoul::lua::luaError(L, msg); @@ -390,7 +390,7 @@ int propertySetValue(lua_State* L) { } else { std::string msg = fmt::format( - "Unexpected type {} in argument 5", + "Unexpected type '{}' in argument 5", ghoul::lua::luaTypeToString(lua_type(L, 5)) ); return ghoul::lua::luaError(L, msg); @@ -402,7 +402,7 @@ int propertySetValue(lua_State* L) { if (!correctName) { LWARNINGC( "propertySetValue", - fmt::format("{} is not a valid easing method", easingMethodName) + fmt::format("'{}' is not a valid easing method", easingMethodName) ); } else { @@ -677,7 +677,7 @@ namespace { SceneGraphNode* foundNode = sceneGraphNode(identifier); if (!foundNode) { throw ghoul::lua::LuaError( - fmt::format("Did not find a match for identifier: {} ", identifier) + fmt::format("Did not find a match for identifier: {}", identifier) ); } @@ -966,13 +966,13 @@ namespace { SceneGraphNode* node = sceneGraphNode(identifier); if (!node) { throw ghoul::lua::LuaError(fmt::format( - "Did not find a match for identifier: {} ", identifier + "Did not find a match for identifier: {}", identifier )); } SceneGraphNode* newParentNode = sceneGraphNode(newParent); if (!newParentNode) { throw ghoul::lua::LuaError(fmt::format( - "Did not find a match for new parent identifier: {} ", newParent + "Did not find a match for new parent identifier: {}", newParent )); } @@ -989,7 +989,7 @@ namespace { SceneGraphNode* node = sceneGraphNode(identifier); if (!node) { throw ghoul::lua::LuaError(fmt::format( - "Did not find a match for identifier: {} ", identifier + "Did not find a match for identifier: {}", identifier )); } @@ -1006,7 +1006,7 @@ namespace { SceneGraphNode* node = sceneGraphNode(identifier); if (!node) { throw ghoul::lua::LuaError(fmt::format( - "Did not find a match for identifier: {} ", identifier + "Did not find a match for identifier: {}", identifier )); } diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index 6fadc2a135..9c11565c9a 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -242,7 +242,7 @@ bool ScriptEngine::runScriptFile(const std::filesystem::path& filename) { ZoneScoped; if (!std::filesystem::is_regular_file(filename)) { - LERROR(fmt::format("Script with name {} did not exist", filename)); + LERROR(fmt::format("Script with name '{}' did not exist", filename)); return false; } @@ -361,7 +361,7 @@ void ScriptEngine::addLibraryFunctions(lua_State* state, LuaLibrary& library, lua_gettable(state, -2); if (lua_isnil(state, -1)) { LERROR(fmt::format( - "Module '{}' did not provide a documentation in script file {}", + "Module '{}' did not provide a documentation in script file '{}'", library.name, script )); lua_pop(state, 1); @@ -492,17 +492,14 @@ void ScriptEngine::writeLog(const std::string& script) { _logFilename = absPath(global::configuration->scriptLog).string(); _logFileExists = true; - LDEBUG(fmt::format( - "Using script log file {}", std::filesystem::path(_logFilename) - )); + LDEBUG(fmt::format("Using script log file '{}'", _logFilename)); // Test file and clear previous input std::ofstream file(_logFilename, std::ofstream::out | std::ofstream::trunc); if (!file.good()) { LERROR(fmt::format( - "Could not open file {} for logging scripts", - std::filesystem::path(_logFilename) + "Could not open file '{}' for logging scripts", _logFilename )); return; diff --git a/src/scripting/scriptengine_lua.inl b/src/scripting/scriptengine_lua.inl index ef8da626e9..a9b55d46ed 100644 --- a/src/scripting/scriptengine_lua.inl +++ b/src/scripting/scriptengine_lua.inl @@ -225,14 +225,14 @@ std::vector walkCommon(std::string path, bool recursive, bool sorte if (is64) { throw ghoul::lua::LuaError(fmt::format( - "Error while unzipping {}: Zip64 archives are not supported", source + "Error while unzipping '{}': Zip64 archives are not supported", source )); } int ret = zip_extract(source.c_str(), destination.c_str(), nullptr, nullptr); if (ret != 0) { throw ghoul::lua::LuaError(fmt::format( - "Error {} while unzipping {}", ret, source + "Error while unzipping '{}': {}", source, ret )); } diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index 263120b8ff..22e1e42d82 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -121,7 +121,7 @@ bool HttpRequest::perform(std::chrono::milliseconds timeout) { if (responseCode >= 400) { LERRORC( "HttpRequest", - fmt::format("Failed download {} with code {}", _url, responseCode) + fmt::format("Failed download '{}' with code {}", _url, responseCode) ); success = false; } @@ -133,7 +133,7 @@ bool HttpRequest::perform(std::chrono::milliseconds timeout) { LERRORC( "HttpRequest", fmt::format( - "Failed download {} with error {}", _url, curl_easy_strerror(res) + "Failed download '{}' with error {}", _url, curl_easy_strerror(res) ) ); } @@ -256,7 +256,7 @@ HttpFileDownload::HttpFileDownload(std::string url, std::filesystem::path destin , _destination(std::move(destination)) { if (!overwrite && std::filesystem::is_regular_file(_destination)) { - throw ghoul::RuntimeError(fmt::format("File {} already exists", _destination)); + throw ghoul::RuntimeError(fmt::format("File '{}' already exists", _destination)); } } @@ -286,7 +286,7 @@ bool HttpFileDownload::setup() { // GetLastError() gives more details than errno. DWORD errorId = GetLastError(); if (errorId == 0) { - LERRORC("HttpFileDownload", fmt::format("Cannot open file {}", _destination)); + LERRORC("HttpFileDownload", fmt::format("Cannot open file '{}'", _destination)); return false; } std::array Buffer; @@ -304,7 +304,7 @@ bool HttpFileDownload::setup() { std::string message(Buffer.data(), size); LERRORC( "HttpFileDownload", - fmt::format("Cannot open file {}: {}", _destination, message) + fmt::format("Cannot open file '{}': {}", _destination, message) ); return false; #else // ^^^ WIN32 / !WIN32 vvv @@ -330,7 +330,7 @@ bool HttpFileDownload::setup() { #endif // __unix__ } - LERRORC("HttpFileDownload", fmt::format("Cannot open file {}", _destination)); + LERRORC("HttpFileDownload", fmt::format("Cannot open file '{}'", _destination)); return false; #endif // WIN32 } diff --git a/src/util/openspacemodule.cpp b/src/util/openspacemodule.cpp index 771a9b82bb..abb03cec72 100644 --- a/src/util/openspacemodule.cpp +++ b/src/util/openspacemodule.cpp @@ -56,7 +56,7 @@ void OpenSpaceModule::initialize(const ghoul::Dictionary& configuration) { std::filesystem::path path = modulePath(); if (!path.empty()) { - LDEBUG(fmt::format("Registering module path {}: {}", moduleToken, path)); + LDEBUG(fmt::format("Registering module path '{}' -> {}", moduleToken, path)); FileSys.registerPathToken(moduleToken, std::move(path)); } diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 5fb7cb2363..2d5b4de9d1 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -212,7 +212,7 @@ SpiceManager::KernelHandle SpiceManager::loadKernel(std::string filePath) { ghoul_assert( std::filesystem::is_directory(std::filesystem::path(filePath).parent_path()), fmt::format( - "File {} exists, but directory {} does not", + "File '{}' exists, but directory '{}' does not", absPath(filePath), std::filesystem::path(filePath).parent_path() ) ); @@ -237,7 +237,7 @@ SpiceManager::KernelHandle SpiceManager::loadKernel(std::string filePath) { std::filesystem::path p = path.parent_path(); std::filesystem::current_path(p); - LINFO(fmt::format("Loading SPICE kernel {}", path)); + LINFO(fmt::format("Loading SPICE kernel '{}'", path)); // Load the kernel furnsh_c(path.string().c_str()); @@ -257,7 +257,7 @@ SpiceManager::KernelHandle SpiceManager::loadKernel(std::string filePath) { } KernelHandle kernelId = ++_lastAssignedKernel; - ghoul_assert(kernelId != 0, fmt::format("Kernel Handle wrapped around to 0")); + ghoul_assert(kernelId != 0, "Kernel Handle wrapped around to 0"); _loadedKernels.push_back({ path.string(), kernelId, 1 }); return kernelId; } @@ -276,7 +276,7 @@ void SpiceManager::unloadKernel(KernelHandle kernelId) { // If there was only one part interested in the kernel, we can unload it if (it->refCount == 1) { // No need to check for errors as we do not allow empty path names - LINFO(fmt::format("Unloading SPICE kernel {}", it->path)); + LINFO(fmt::format("Unloading SPICE kernel '{}'", it->path)); unload_c(it->path.c_str()); _loadedKernels.erase(it); } @@ -302,7 +302,7 @@ void SpiceManager::unloadKernel(std::string filePath) { if (it == _loadedKernels.end()) { if (_useExceptions) { throw SpiceException( - fmt::format("{} did not correspond to a loaded kernel", path) + fmt::format("'{}' did not correspond to a loaded kernel", path) ); } else { @@ -312,7 +312,7 @@ void SpiceManager::unloadKernel(std::string filePath) { else { // If there was only one part interested in the kernel, we can unload it if (it->refCount == 1) { - LINFO(fmt::format("Unloading SPICE kernel {}", path)); + LINFO(fmt::format("Unloading SPICE kernel '{}'", path)); unload_c(path.string().c_str()); _loadedKernels.erase(it); } @@ -636,7 +636,7 @@ glm::dvec3 SpiceManager::targetPosition(const std::string& target, if (_useExceptions) { throw SpiceException( fmt::format( - "Neither target '{}' nor observer '{}' has SPK coverage at time {}", + "Neither target '{}' nor observer '{}' has SPK coverage at time '{}'", target, observer, ephemerisTime ) ); @@ -658,7 +658,7 @@ glm::dvec3 SpiceManager::targetPosition(const std::string& target, ); if (failed_c()) { throwSpiceError(fmt::format( - "Error getting position from '{}' to '{}' in frame '{}' at time {}", + "Error getting position from '{}' to '{}' in frame '{}' at time '{}'", target, observer, referenceFrame, ephemerisTime )); } diff --git a/src/util/taskloader.cpp b/src/util/taskloader.cpp index 5d633915bf..050f5b498e 100644 --- a/src/util/taskloader.cpp +++ b/src/util/taskloader.cpp @@ -71,7 +71,9 @@ std::vector> TaskLoader::tasksFromDictionary( std::vector> TaskLoader::tasksFromFile(const std::string& path) { std::filesystem::path absTasksFile = absPath(path); if (!std::filesystem::is_regular_file(absTasksFile)) { - LERROR(fmt::format("Could not load tasks file {}. File not found", absTasksFile)); + LERROR(fmt::format( + "Could not load tasks file '{}'. File not found", absTasksFile + )); return std::vector>(); } @@ -81,7 +83,7 @@ std::vector> TaskLoader::tasksFromFile(const std::string& } catch (const ghoul::RuntimeError& e) { LERROR(fmt::format( - "Could not load tasks file {}. Lua error: {}: {}", + "Could not load tasks file '{}'. Lua error: ({}) {}", absTasksFile, e.message, e.component )); return std::vector>(); @@ -91,7 +93,7 @@ std::vector> TaskLoader::tasksFromFile(const std::string& return tasksFromDictionary(tasksDictionary); } catch (const documentation::SpecificationError& e) { - LERROR(fmt::format("Could not load tasks file {}. {}", absTasksFile, e.what())); + LERROR(fmt::format("Could not load tasks file '{}': {}", absTasksFile, e.what())); logError(e); return std::vector>(); diff --git a/support/coding/codegen b/support/coding/codegen index 3f6582f3ba..3cae27731c 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit 3f6582f3ba889e20dc4ca42b27f7f8e761877278 +Subproject commit 3cae27731c6a0b8a7a0e81c916d4298a860f4e1b