Logging: Add a flag to specify the minimum log level
--log_level = (0=error, 1=warning, 2=info, 3=debug)
This commit is contained in:
@@ -743,7 +743,7 @@ void UserModule::Dump() {
|
||||
sb.AppendFormat("\n");
|
||||
}
|
||||
|
||||
xe::LogLine('i', sb.GetString());
|
||||
xe::LogLine(xe::LogLevel::LOG_LEVEL_INFO, 'i', sb.GetString());
|
||||
}
|
||||
|
||||
} // namespace kernel
|
||||
|
||||
@@ -450,9 +450,11 @@ void PrintKernelCall(cpu::Export* export_entry, const Tuple& params) {
|
||||
AppendKernelCallParams(string_buffer, export_entry, params);
|
||||
string_buffer.Append(')');
|
||||
if (export_entry->tags & xe::cpu::ExportTag::kImportant) {
|
||||
xe::LogLine('i', string_buffer.GetString(), string_buffer.length());
|
||||
xe::LogLine(xe::LogLevel::LOG_LEVEL_INFO, 'i', string_buffer.GetString(),
|
||||
string_buffer.length());
|
||||
} else {
|
||||
xe::LogLine('d', string_buffer.GetString(), string_buffer.length());
|
||||
xe::LogLine(xe::LogLevel::LOG_LEVEL_DEBUG, 'd', string_buffer.GetString(),
|
||||
string_buffer.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user