2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-24 01:06:40 +00:00

feat: verbose option sets log level to debug

This commit is contained in:
Jan Laupetin
2025-09-11 22:17:56 +02:00
parent 02f20f09b6
commit d693ace12f
13 changed files with 29 additions and 57 deletions

View File

@@ -146,8 +146,7 @@ UnlinkerArgs::UnlinkerArgs()
m_minimal_zone_def(false),
m_asset_type_handling(AssetTypeHandling::EXCLUDE),
m_skip_obj(false),
m_use_gdt(false),
m_verbose(false)
m_use_gdt(false)
{
}
@@ -171,13 +170,6 @@ void UnlinkerArgs::PrintVersion()
con::info("OpenAssetTools Unlinker {}", GIT_VERSION);
}
void UnlinkerArgs::SetVerbose(const bool isVerbose)
{
m_verbose = isVerbose;
ObjLoading::Configuration.Verbose = isVerbose;
ObjWriting::Configuration.Verbose = isVerbose;
}
bool UnlinkerArgs::SetImageDumpingMode() const
{
auto specifiedValue = m_argument_parser.GetValueForOption(OPTION_IMAGE_FORMAT);
@@ -303,7 +295,10 @@ bool UnlinkerArgs::ParseArgs(const int argc, const char** argv, bool& shouldCont
}
// -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;
// -min; --minimal-zone
m_minimal_zone_def = m_argument_parser.IsOptionSpecified(OPTION_MINIMAL_ZONE_FILE);

View File

@@ -24,8 +24,6 @@ private:
*/
void PrintUsage() const;
static void PrintVersion();
void SetVerbose(bool isVerbose);
bool SetImageDumpingMode() const;
bool SetModelDumpingMode() const;
@@ -60,8 +58,6 @@ public:
bool m_skip_obj;
bool m_use_gdt;
bool m_verbose;
UnlinkerArgs();
bool ParseArgs(int argc, const char** argv, bool& shouldContinue);