Browse Source

Added information to Login request / connection termination log entries

Tal Aloni 8 years ago
parent
commit
88acd7d905

+ 2 - 1
ISCSI/ISCSI.Server/ISCSIServer.PDUProcessor.cs

@@ -61,7 +61,8 @@ namespace ISCSI.Server
                 if (pdu is LoginRequestPDU)
                 {
                     LoginRequestPDU request = (LoginRequestPDU)pdu;
-                    Log(Severity.Verbose, "[{0}] Login Request, current stage: {1}, next stage: {2}, parameters: {3}", state.ConnectionIdentifier, request.CurrentStage, request.NextStage, FormatNullDelimitedText(request.LoginParametersText));
+                    string loginIdentifier = String.Format("ISID={0},TSIH={1},CID={2}", request.ISID.ToString("x"), request.TSIH.ToString("x"), request.CID.ToString("x"));
+                    Log(Severity.Verbose, "[{0}] Login Request, current stage: {1}, next stage: {2}, parameters: {3}", loginIdentifier, request.CurrentStage, request.NextStage, FormatNullDelimitedText(request.LoginParametersText));
                     LoginResponsePDU response = GetLoginResponsePDU(request, state.ConnectionParameters);
                     if (state.Session != null && state.Session.IsFullFeaturePhase)
                     {

+ 1 - 1
ISCSI/ISCSI.Server/ISCSIServer.cs

@@ -179,7 +179,7 @@ namespace ISCSI.Server
             if (numberOfBytesReceived == 0)
             {
                 // The other side has closed the connection
-                Log(Severity.Verbose, "The initiator has closed the connection");
+                Log(Severity.Verbose, "[{0}] The initiator has closed the connection", state.ConnectionIdentifier);
                 m_connectionManager.ReleaseConnection(state);
                 if (state.Session != null)
                 {