Reduce logging in controller (#1332)

This commit is contained in:
Uwe Seimet 2023-11-10 15:47:43 +01:00 committed by GitHub
parent 9ce1bce592
commit a164340179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,13 +178,15 @@ void ScsiController::Command()
void ScsiController::Execute() void ScsiController::Execute()
{ {
stringstream s; if (spdlog::get_level() == spdlog::level::trace) {
s << "Controller is executing " << command_mapping.find(GetOpcode())->second.second << ", CDB $" stringstream s;
<< setfill('0') << hex; s << "Controller is executing " << command_mapping.find(GetOpcode())->second.second << ", CDB $"
for (int i = 0; i < BUS::GetCommandByteCount(static_cast<uint8_t>(GetOpcode())); i++) { << setfill('0') << hex;
s << setw(2) << GetCmdByte(i); for (int i = 0; i < BUS::GetCommandByteCount(static_cast<uint8_t>(GetOpcode())); i++) {
} s << setw(2) << GetCmdByte(i);
LogDebug(s.str()); }
LogTrace(s.str());
}
// Initialization for data transfer // Initialization for data transfer
ResetOffset(); ResetOffset();