24 lines
563 B
C++
24 lines
563 B
C++
#pragma once
|
|
#include <string>
|
|
#include <spdlog/spdlog.h>
|
|
|
|
namespace lsp::utils
|
|
{
|
|
struct ServerConfig
|
|
{
|
|
bool use_stderr = false;
|
|
std::string log_file;
|
|
spdlog::level::level_enum log_level = spdlog::level::info;
|
|
size_t thread_count = 4;
|
|
bool show_help = false;
|
|
};
|
|
|
|
class ArgsParser
|
|
{
|
|
public:
|
|
static ServerConfig Parse(int argc, char* argv[]);
|
|
static void SetupLogger(const ServerConfig& config);
|
|
static void PrintHelp(const std::string& program_name);
|
|
};
|
|
}
|