Files
nats-server/server
Ivan Kozlovic 25647a1fda [IMPROVED] MQTT: add client id to client connection string
This way, any log statement for a client will include the client id,
similar to how the server now logs information about NATS clients
(such as language, version, connection name).

Also adding a debug statement once the client has successfully connected.

Here is how this will look like for a client with client id "client_0".
```
[69591] 2021/10/06 10:06:50.837977 [DBG] [::1]:57415 - mid:18 - Client connection created
[69591] 2021/10/06 10:06:50.839871 [DBG] [::1]:57415 - mid:18 - "client_0" - Client connected
[69591] 2021/10/06 10:07:00.627307 [DBG] [::1]:57415 - mid:18 - "client_0" - Client connection closed: Client Closed
```
All log statements will be affected, for instance here is an auth error:
```
[69591] 2021/10/06 10:09:48.618964 [DBG] [::1]:57424 - mid:23 - Client connection created
[69591] 2021/10/06 10:09:48.619015 [ERR] [::1]:57424 - mid:23 - "client_0" - authentication error - User "mqtt"
[69591] 2021/10/06 10:09:48.619026 [DBG] [::1]:57424 - mid:23 - "client_0" - Client connection closed: Authentication Failure
[69591] 2021/10/06 10:09:48.619038 [ERR] [::1]:57424 - mid:23 - "client_0" - unable to connect: authentication error
```

Resolves #2587

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-06 10:59:50 -06:00
..
2020-05-19 14:15:11 -07:00
2021-07-22 11:27:34 -04:00
2021-04-09 15:18:06 -07:00
2021-09-27 19:59:05 -07:00
2021-08-26 16:52:43 +02:00
2021-08-26 16:52:43 +02:00
2020-02-25 19:53:09 -05:00
2021-05-26 08:04:50 +02:00
2021-09-09 09:53:22 -07:00
2021-09-22 14:46:31 -07:00
2021-07-23 10:19:07 +01:00
2021-01-14 01:14:52 -08:00
2021-01-14 01:14:52 -08:00
2021-09-21 08:02:11 -07:00
2021-09-21 17:13:53 -04:00
2021-09-23 09:56:42 -06:00
2020-06-12 10:03:47 -06:00
2019-11-14 20:05:32 -07:00
2021-09-01 14:55:26 -07:00
2021-04-12 10:17:13 -07:00
2019-12-12 11:58:24 -07:00
2021-09-21 08:02:11 -07:00
2021-09-29 18:59:21 -07:00
2021-09-13 15:22:05 +03:00
2021-09-13 14:06:17 -06:00