wso2auditaudit-logging

WSO2 logging remot IP address in audit.log


Does anyone know if it is possible to log in WSO2's audit.log the user's IP address? What's the format I have to configure in repository/conf/log4j2.properties? It works just fine in http_access*.log but I am unable to set it in audit.log


Solution

  • Try adding the below to the deployment.toml

    [audit.log.contextual_param]
    params = ["remote_address"]
    

    Besides the remote_address you can also add user_agent as a parameter or both at the same time.