Browse Source

[2617] added a debug message on session establishment with lname. debug aid.

JINMEI Tatuya 12 years ago
parent
commit
269cd18672
2 changed files with 13 additions and 5 deletions
  1. 3 0
      src/bin/msgq/msgq.py.in
  2. 10 5
      src/bin/msgq/msgq_messages.mes

+ 3 - 0
src/bin/msgq/msgq.py.in

@@ -311,6 +311,9 @@ class MsgQ:
         lname = self.newlname()
         lname = self.newlname()
         self.lnames[lname] = newsocket
         self.lnames[lname] = newsocket
 
 
+        logger.debug(TRACE_BASIC, MSGQ_SOCKET_REGISTERED, newsocket.fileno(),
+                     lname)
+
         if self.poller:
         if self.poller:
             self.poller.register(newsocket, select.POLLIN)
             self.poller.register(newsocket, select.POLLIN)
         else:
         else:

+ 10 - 5
src/bin/msgq/msgq_messages.mes

@@ -41,6 +41,11 @@ This may be caused by a programmer error (one of the components sending invalid
 data) or possibly by incompatible version of msgq and the component (but that's
 data) or possibly by incompatible version of msgq and the component (but that's
 unlikely, as the protocol is not changed often).
 unlikely, as the protocol is not changed often).
 
 
+% MSGQ_INVALID_CMD Received invalid command: %1
+An unknown command listed in the log has been received. It is ignored. This
+indicates either a programmer error (eg. a typo in the command name) or
+incompatible version of a module and message queue daemon.
+
 % MSGQ_LISTENER_FAILED Failed to initialize listener on socket file '%1': %2
 % MSGQ_LISTENER_FAILED Failed to initialize listener on socket file '%1': %2
 The message queue daemon tried to listen on a file socket (the path is in the
 The message queue daemon tried to listen on a file socket (the path is in the
 message), but it failed. The error from the operating system is logged.
 message), but it failed. The error from the operating system is logged.
@@ -75,11 +80,6 @@ the corresponding socket is dropped.
 % MSGQ_RECV_HDR Received header: %1
 % MSGQ_RECV_HDR Received header: %1
 Debug message. This message includes the whole routing header of a packet.
 Debug message. This message includes the whole routing header of a packet.
 
 
-% MSGQ_INVALID_CMD Received invalid command: %1
-An unknown command listed in the log has been received. It is ignored. This
-indicates either a programmer error (eg. a typo in the command name) or
-incompatible version of a module and message queue daemon.
-
 % MSGQ_SEND_ERR Error while sending to socket %1: %2
 % MSGQ_SEND_ERR Error while sending to socket %1: %2
 There was a low-level error when sending data to a socket. The error is logged
 There was a low-level error when sending data to a socket. The error is logged
 and the corresponding socket is dropped.
 and the corresponding socket is dropped.
@@ -87,6 +87,11 @@ and the corresponding socket is dropped.
 % MSGQ_SHUTDOWN Stopping Msgq
 % MSGQ_SHUTDOWN Stopping Msgq
 Debug message. The message queue is shutting down.
 Debug message. The message queue is shutting down.
 
 
+% MSGQ_SOCKET_REGISTERED Registered a socket descriptor %1 with lname %2
+Debug message. The msgq daemon accepted a session request on the
+shown descriptor of socket and assigned a unique identifier (lname)
+for the client on that socket.
+
 % MSGQ_SOCK_CLOSE Closing socket fd %1
 % MSGQ_SOCK_CLOSE Closing socket fd %1
 Debug message. Closing the mentioned socket.
 Debug message. Closing the mentioned socket.