Skip to content

Commit

Permalink
Merge pull request #251 from birkenfeld/master
Browse files Browse the repository at this point in the history
fix: add missing logging args and context
  • Loading branch information
dasgarner authored Jan 28, 2022
2 parents 767ba76 + 4ea93c4 commit 1fdfaac
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion player/cms/CollectionInterval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void CollectionInterval::submitStats()
}
catch (const std::exception& e)
{
Log::error(e.what());
Log::error("[CollectionInterval] {}", e.what());
Log::error("[CollectionInterval] Failed to submit stats");
}
}
Expand Down
2 changes: 1 addition & 1 deletion player/cms/RequiredFilesDownloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bool RequiredFilesDownloader::onRegularFileDownloaded(const ResponseContentResul
}
else
{
Log::error("[{}] Download error: {}", file.name());
Log::error("[{}] Download error: {}", file.name(), error);
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions player/common/logger/XmlLogsRetriever.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ std::string XmlLogsRetriever::formatLogs(const std::string& logs)
}
catch (std::exception& e)
{
Log::error("[XmlLogsRetriever] Format logs error: ", e.what());
Log::trace(logs);
Log::error("[XmlLogsRetriever] Format logs error: {}", e.what());
Log::trace("[XmlLogsRetriever] {}", logs);
}

return {};
Expand Down
6 changes: 3 additions & 3 deletions player/control/layout/LayoutsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ std::unique_ptr<Xibo::MainLayout> LayoutsManager::createLayout(int layoutId)
}
catch (const std::exception& e)
{
Log::error(e.what());
Log::error("[LayoutsManager] {}", e.what());
}
});
layout->mediaStatsReady().connect([this, layoutId, scheduleId](const MediaPlayingTime& intervals) {
Expand All @@ -115,7 +115,7 @@ std::unique_ptr<Xibo::MainLayout> LayoutsManager::createLayout(int layoutId)
}
catch (const std::exception& e)
{
Log::error(e.what());
Log::error("[LayoutsManager] {}", e.what());
}
});

Expand All @@ -136,7 +136,7 @@ std::unique_ptr<Xibo::MainLayout> LayoutsManager::createLayout(int layoutId)
}
catch (std::exception& e)
{
Log::error(e.what());
Log::error("[LayoutsManager] {}", e.what());
Log::info("[LayoutsManager] Check resource folder to find out what happened");
}

Expand Down
6 changes: 3 additions & 3 deletions player/schedule/LayoutSchedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LayoutSchedule LayoutSchedule::fromFile(const FilePath& path)
}
catch (std::exception& e)
{
Log::error(e.what());
Log::error("[LayoutSchedule] {}", e.what());
}
return {};
}
Expand All @@ -30,7 +30,7 @@ LayoutSchedule LayoutSchedule::fromString(const std::string& string)
}
catch (std::exception& e)
{
Log::error(e.what());
Log::error("[LayoutSchedule] {}", e.what());
}
return {};
}
Expand All @@ -44,7 +44,7 @@ void LayoutSchedule::toFile(const FilePath& path) const
}
catch (std::exception& e)
{
Log::error(e.what());
Log::error("[LayoutSchedule] {}", e.what());
}
}

Expand Down

0 comments on commit 1fdfaac

Please sign in to comment.