+static std::string GetProgressDeb822String(char const * const status,
+ char const * const pkg, unsigned long long Done,
+ unsigned long long Total, char const * const msg)
+{
+ float const progress{Done / static_cast<float>(Total) * 100};
+ std::ostringstream str;
+ str.imbue(std::locale::classic());
+ str.precision(4);
+ str << "Status: " << status << '\n';
+ if (pkg != nullptr)
+ str << "Package: " << pkg << '\n';
+ str << "Percent: " << std::fixed << progress << '\n'
+ << "Message: " << msg << "\n\n";
+ return str.str();
+}
+