diff --git a/Applications/CLI/ogs.cpp b/Applications/CLI/ogs.cpp index 3ea15928f055c4e63ac8931f523184aae5ab917c..4e53247911cc3a004e31532b6253123bbc7868c3 100644 --- a/Applications/CLI/ogs.cpp +++ b/Applications/CLI/ogs.cpp @@ -123,6 +123,10 @@ int main(int argc, char* argv[]) BaseLib::setConsoleLogLevel(log_level_arg.getValue()); spdlog::set_pattern("%^%l:%$ %v"); + spdlog::set_error_handler([](const std::string& msg) { + std::cerr << "spdlog error: " << msg << std::endl; + OGS_FATAL("spdlog logger error occured."); + }); INFO("This is OpenGeoSys-6 version {:s}.", GitInfoLib::GitInfo::ogs_version);