feat(logging): include LUN into log messages

a process might have a connection to different LUNs on the same target.
To be able to distinguish the different connections add the LUN id to the target
to log messages.

Signed-off-by: Peter Lieven <pl@dlhnet.de>
This commit is contained in:
Peter Lieven
2025-03-25 21:04:34 +00:00
parent b8d9fbf5e3
commit 7f0a8597d6

View File

@@ -72,9 +72,9 @@ iscsi_log_message(struct iscsi_context *iscsi, int level, const char *format, ..
}
if (iscsi->target_name[0]) {
static char message2[1282];
static char message2[1294];
snprintf(message2, 1282, "%s [%s]", message, iscsi->target_name);
snprintf(message2, sizeof(message2), "%s [%s/%d]", message, iscsi->target_name, iscsi->lun);
iscsi->log_fn(level, message2);
}
else