Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: add missing logging args and context #251

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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