Skip to content

Commit 8e66328

Browse files
allow setting --log-level in convert (#1917)
1 parent 4428ab3 commit 8e66328

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/convert/main.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ using Dx12JsonConsumer =
4747
#endif
4848
const char kOptions[] = "-h|--help,--version,--no-debug-popup,--file-per-frame,--include-binaries,--expand-flags";
4949

50-
const char kArguments[] = "--output,--format";
50+
const char kArguments[] = "--output,--format,--log-level";
5151

5252
static void PrintUsage(const char* exe_name)
5353
{
@@ -162,6 +162,12 @@ int main(int argc, const char** argv)
162162
}
163163
#endif
164164

165+
// Reinitialize logging with values retrieved from command line arguments
166+
gfxrecon::util::Log::Settings log_settings;
167+
GetLogSettings(arg_parser, log_settings);
168+
gfxrecon::util::Log::Release();
169+
gfxrecon::util::Log::Init(log_settings);
170+
165171
const auto& positional_arguments = arg_parser.GetPositionalArguments();
166172
std::string input_filename = positional_arguments[0];
167173
JsonFormat output_format = GetOutputFormat(arg_parser);

0 commit comments

Comments
 (0)