jbertram commented on code in PR #4408:
URL: https://github.com/apache/activemq-artemis/pull/4408#discussion_r1145287132
##########
artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java:
##########
@@ -2639,4 +2644,18 @@ static void isAutoDelete(Object source) {
@LogMessage(id = 601766, value = "User {} is getting auto-delete property
on target resource: {}", level = LogMessage.Level.INFO)
void isAutoDelete(String user, Object source);
+
+ static void createdConnection(String protocol, Object connectionID, String
remoteAddress) {
+ CONNECTION_LOGGER.createdConnection(protocol, connectionID.toString(),
String.format("unknown%s", formatRemoteAddress(remoteAddress)));
Review Comment:
At the point where this is logged the user isn't actually known yet since
that data hasn't been parsed. We definitely don't want to add any additional
parsing here as this is on the hot path for every connection. However, I left
the user information in the log for 2 main reasons:
- To show the IP address
- To be consistent with the rest of the audit logging
The connection ID is also logged here as well as in the authentication
message so these audit messages can be correlated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]