How to change pattern of log message in log4j2.xml
We don't want to print UserID in logs due to some security reason and Need to display another internal id of the customer instead of userID .
I see the following default pattern layout in log4j2.xml . How do we send/configure custom parameters to log4j2.xml to print the log messages in desired pattern.
<PatternLayout>
<§§>%d [%20.20t] [%10.10X{pegathread}] [%20.20X{tenantid}] [%20.20X{app}] (%30.30c{3}) %-5p %X{stack} %X{userid} - %m%n</Pattern>
</PatternLayout>