diff options
Diffstat (limited to 'zenserver/config.cpp')
| -rw-r--r-- | zenserver/config.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp index ddef83c02..578a3a202 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -14,7 +14,7 @@ #pragma warning(pop) #include <fmt/format.h> -#include <spdlog/spdlog.h> +#include <zencore/logging.h> #include <sol/sol.hpp> #if ZEN_PLATFORM_WINDOWS @@ -59,6 +59,9 @@ void ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions, ZenServiceConfig& ServiceConfig) { cxxopts::Options options("zenserver", "Zen Server"); + options.add_options()("dedicated", + "Enable dedicated server mode", + cxxopts::value<bool>(GlobalOptions.IsDedicated)->default_value("false")); options.add_options()("d, debug", "Enable debugging", cxxopts::value<bool>(GlobalOptions.IsDebug)->default_value("false")); options.add_options()("help", "Show command line help"); options.add_options()("t, test", "Enable test mode", cxxopts::value<bool>(GlobalOptions.IsTest)->default_value("false")); @@ -237,9 +240,9 @@ ParseServiceConfig(const std::filesystem::path& DataRoot, ZenServiceConfig& Serv } catch (std::exception& e) { - spdlog::error("config script failure: {}", e.what()); + ZEN_ERROR("config script failure: {}", e.what()); - throw std::exception("fatal zen global config script ({}) failure: {}"_format(ConfigScript, e.what()).c_str()); + throw std::runtime_error("fatal zen global config script ({}) failure: {}"_format(ConfigScript, e.what()).c_str()); } ServiceConfig.MeshEnabled = lua["mesh"]["enable"].get_or(ServiceConfig.MeshEnabled); |