271{
272 try {
273 LogAndSave(fmt::format(
"Application: System language {}.",
274 juce::SystemStats::getDisplayLanguage().toStdString()));
275 LogAndSave(fmt::format(
"Application: CPU {}.",
276 juce::SystemStats::getCpuModel().toStdString()));
277
278 if constexpr (kNdebug) {
279 LogAndSave(fmt::format(
"Application: Application version {}.",
280 ProjectInfo::versionString));
281 }
282 else {
283 LogAndSave(fmt::format(
"Application: Application version {}-debug.",
284 ProjectInfo::versionString));
285 }
286
287 LogAndSave(fmt::format(
"Application: Application path {}.",
288 juce::File::getSpecialLocation(juce::File::currentApplicationFile)
289 .getFullPathName()
290 .toStdString()));
291 LogAndSave(fmt::format(
"Application: Profile directory {}.", profile_directory));
292 LogAndSave(fmt::format(
"Application: Log file directory {}.",
294 LogAndSave(fmt::format(
"Application: Settings file directory {}.",
296#ifdef _WIN32
297
298 LogAndSave(fmt::format(
"Application: Keyboard type {}.", GetKeyboardLayout()));
299#endif
301 juce::SystemStats::getJUCEVersion().toStdString()));
302 }
303 catch (...) {
304 try {
305 static constexpr auto kErr {"Failed to obtain app info. Exception."};
306 info_.emplace_back(kErr);
307 rsj::Log(kErr, std::source_location::current());
308 }
309 catch (...) {
310 }
311 }
312}
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:112