272{
273 try {
274 LogAndSave(fmt::format(FMT_STRING(
"Application: System language {}."),
275 juce::SystemStats::getDisplayLanguage().toStdString()));
276 LogAndSave(fmt::format(FMT_STRING(
"Application: CPU {}."),
277 juce::SystemStats::getCpuModel().toStdString()));
278
279 if constexpr (kNdebug) {
280 LogAndSave(fmt::format(FMT_STRING(
"Application: Application version {}."),
281 ProjectInfo::versionString));
282 }
283 else {
284 LogAndSave(fmt::format(FMT_STRING(
"Application: Application version {}-debug."),
285 ProjectInfo::versionString));
286 }
287
288 LogAndSave(fmt::format(FMT_STRING(
"Application: Application path {}."),
289 juce::File::getSpecialLocation(juce::File::currentApplicationFile)
290 .getFullPathName()
291 .toStdString()));
292 LogAndSave(fmt::format(FMT_STRING(
"Application: Profile directory {}."), profile_directory));
293 LogAndSave(fmt::format(FMT_STRING(
"Application: Log file directory {}."),
295 LogAndSave(fmt::format(FMT_STRING(
"Application: Settings file directory {}."),
297#ifdef _WIN32
298
299 LogAndSave(fmt::format(FMT_STRING(
"Application: Keyboard type {}."), GetKeyboardLayout()));
300#endif
301 LogAndSave(fmt::format(FMT_STRING(
"Juce version {}."),
302 juce::SystemStats::getJUCEVersion().toStdString()));
303 }
304 catch (...) {
305 try {
306 static constexpr auto kErr {"Failed to obtain app info. Exception."};
307 info_.emplace_back(kErr);
309 }
310 catch (...) {
311 }
312 }
313}
std::vector< std::string > info_
Definition DebugInfo.h:38
void LogAndSave(std::string &&msg)
Definition DebugInfo.h:32
std::string AppLogFilePath(const std::string &file_name)
std::string AppDataFilePath(const std::string &file_name)
void Log(const juce::String &info, const std::source_location &location=std::source_location::current()) noexcept
Definition Misc.cpp:131