mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-02 17:27:47 +00:00
feat: verbose option sets log level to debug
This commit is contained in:
@@ -129,8 +129,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]{
|
||||
};
|
||||
|
||||
LinkerArgs::LinkerArgs()
|
||||
: m_verbose(false),
|
||||
m_argument_parser(COMMAND_LINE_OPTIONS, std::extent_v<decltype(COMMAND_LINE_OPTIONS)>)
|
||||
: m_argument_parser(COMMAND_LINE_OPTIONS, std::extent_v<decltype(COMMAND_LINE_OPTIONS)>)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -160,13 +159,6 @@ void LinkerArgs::SetBinFolder()
|
||||
m_bin_folder = path.parent_path().string();
|
||||
}
|
||||
|
||||
void LinkerArgs::SetVerbose(const bool isVerbose)
|
||||
{
|
||||
m_verbose = isVerbose;
|
||||
ObjLoading::Configuration.Verbose = isVerbose;
|
||||
ObjWriting::Configuration.Verbose = isVerbose;
|
||||
}
|
||||
|
||||
bool LinkerArgs::ParseArgs(const int argc, const char** argv, bool& shouldContinue)
|
||||
{
|
||||
shouldContinue = true;
|
||||
@@ -203,7 +195,10 @@ bool LinkerArgs::ParseArgs(const int argc, const char** argv, bool& shouldContin
|
||||
}
|
||||
|
||||
// -v; --verbose
|
||||
SetVerbose(m_argument_parser.IsOptionSpecified(OPTION_VERBOSE));
|
||||
if (m_argument_parser.IsOptionSpecified(OPTION_VERBOSE))
|
||||
con::globalLogLevel = con::LogLevel::DEBUG;
|
||||
else
|
||||
con::globalLogLevel = con::LogLevel::INFO;
|
||||
|
||||
// b; --base-folder
|
||||
if (m_argument_parser.IsOptionSpecified(OPTION_BASE_FOLDER))
|
||||
|
||||
@@ -17,8 +17,6 @@ public:
|
||||
LinkerArgs();
|
||||
bool ParseArgs(int argc, const char** argv, bool& shouldContinue);
|
||||
|
||||
bool m_verbose;
|
||||
|
||||
std::vector<std::string> m_zones_to_load;
|
||||
std::vector<std::string> m_project_specifiers_to_build;
|
||||
|
||||
@@ -38,7 +36,6 @@ private:
|
||||
static void PrintVersion();
|
||||
|
||||
void SetBinFolder();
|
||||
void SetVerbose(bool isVerbose);
|
||||
|
||||
ArgumentParser m_argument_parser;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user