In a successful smart client desktop connection with the appserver via broker, we involve 3 log files: broker DLL log, broker log, and appserver log.
Broker DLL log
This log shows several useful data, such as DLL version, the host in which smart client is running, the broker IP and port, the handshake ID and the time of connection opening and closing.
In this example, we must:
DLL version: 2.0.16
host in which smart client is running: tec-***** (ip 10.172.78.66)
broker ip and port: 127.0.0.1:50000
handshake id: AEF50...52F4F9 (used to trace the connection in broker log)
time the connection starts: 14:43:34
time the connection ends: 14:45:26
In this example, notice that as the connection took place without errors, the line with the message "creation of new connection successful" appears; then, after some time (taken by the user to operate the smart client), the line with the message "client connection closed remotely" appears, after the user closed the smart client as usual.
In the corresponding broker log, we also have several useful data, but the interesting thing in this example are the smart client connection opening and closing sequences.
We can se in the line with the message "received initial handshake from client" the same id AEF50...52F4F9 found in the DLL log. This line shows another important piece of information: the "context" associated to this connection: ctx:008. All log messages related to this connections will be associated to this context "ctx:008". Thus, we can isolate the messages related to specific connections, even if many smart clients use the same broker.
The opening sequence of a successful connection starts with the message "initial handshake received" and proceeds to the line "creation of new connection successful". From this point onward, smart client converses normally with appserver (it will appear in the server monitor).
The regular closing sequence starts with the line "client connection closed remotely" (that is, smart client has closed the connection) and continues to the line "error, connection closed by server in standby mode". The reason for this "error" line is that broker does not know the connection is being normally closed. Thus, when smart client closes the connection, broker leaves the connection on standby, but soon thereafter the appserver closes the connection (which is normal), causing this "error" message in the broker log.
Notice that in this test example only one smart client is in use, so all lines related to this smart client appear on a sequence in the broker log. In a normal scenario with multiple smart clients, messages pertaining several smart clients are scrambled.
The appserver log related to this connection shows the start and the end, without any further information, because the test only comprised a few screen exchanges. Notice again that, as only a single smart client was connected, the messages of connection start and end appear on a sequence, one right after the other.
Pay attention to the timekeeping records in the 3 logs. In the DLL log, the actual start of connection was at 2:43:34 PM, in the broker log also at 2:43:34 PM, and in the appserver log at 2:43:37 PM. The closing appears in the appserver log at 2:45:26 PM, in the broker log at 2:45:26 PM and in the DLL log also at 2:45:26 PM.