mirror of https://github.com/akuker/RASCSI.git
Fix missing logging for a LUN when the LUN is explicitly specified
This commit is contained in:
parent
e5b99d4fa9
commit
02e19db539
|
@ -39,16 +39,14 @@ void DeviceLogger::Error(const string& message) const
|
|||
|
||||
void DeviceLogger::Log(level::level_enum level, const string& message) const
|
||||
{
|
||||
if (!message.empty() &&
|
||||
(log_device_id == -1 ||
|
||||
(log_device_id == id && (log_device_lun == -1 || log_device_lun == lun)))) {
|
||||
if (lun == -1) {
|
||||
log(level, "(ID " + to_string(id) + ") - " + message);
|
||||
}
|
||||
else {
|
||||
log(level, "(ID:LUN " + to_string(id) + ":" + to_string(lun) + ") - " + message);
|
||||
}
|
||||
}
|
||||
if ((log_device_id == -1 || log_device_id == id) && (log_device_lun == -1 || log_device_lun == lun)) {
|
||||
if (lun == -1) {
|
||||
log(level, "(ID " + to_string(id) + ") - " + message);
|
||||
}
|
||||
else {
|
||||
log(level, "(ID:LUN " + to_string(id) + ":" + to_string(lun) + ") - " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DeviceLogger::SetIdAndLun(int i, int l)
|
||||
|
|
Loading…
Reference in New Issue