[ 
https://issues.apache.org/jira/browse/ARTEMIS-4210?focusedWorklogId=854015&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-854015
 ]

ASF GitHub Bot logged work on ARTEMIS-4210:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Mar/23 20:38
            Start Date: 30/Mar/23 20:38
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4423:
URL: https://github.com/apache/activemq-artemis/pull/4423#discussion_r1153762665


##########
artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java:
##########
@@ -2646,14 +2641,14 @@ static void isAutoDelete(Object source) {
    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)));
+      RESOURCE_LOGGER.createdConnection(protocol, connectionID == null ? null 
: connectionID.toString(), String.format("unknown%s", 
formatRemoteAddress(remoteAddress)));

Review Comment:
   String.valueOf(connection) would been easier





Issue Time Tracking
-------------------

    Worklog Id:     (was: 854015)
    Time Spent: 1h 20m  (was: 1h 10m)

> Audit connection creation & destruction
> ---------------------------------------
>
>                 Key: ARTEMIS-4210
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4210
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> From the user's mailing list:
> {quote}
> I was looking into the audit logs offered by Artemis and I tried to 
> connect/disconnect an MQTT client to/from the broker.
> While I found some logs at the MQTT connection (like this: 2023-03-16 
> 11:05:28,291 [AUDIT](Thread-1 
> (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@1ad926d3))
>  AMQ601715: User test==(Role_2)@127.0.0.1:51057 successfully authenticated), 
> I was not able to find any log for tracing the MQTT disconection.
> I was wondering if it is possible, in one of the next releases, to add an 
> audit log specific for the disconnection, since, from the Audit Log 
> perspective, it would be useful to trace both the user login and his 
> logout.{quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to