Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Log4j: user email instead of user id

Luc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 27, 2022

I'm trying to do something fairly simple (I think) in the JIRA server logs...  I'm simply trying to modify the log4j output to include the user's email instead of the user's id.  For example, in the log4j.properties file, the following line can be found:

%d{yyyy-MM-dd HH:mm:ss,SSSZ} %t %p %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.ipaddr} %X{jira.request.url} [%q{2}] %m%n

Is there any documentation on what JIRA variables are available for the conversion pattern %X.  I'm trying to replace %X{jira.username} by a variable that would give me the user's email address.

I've tried %X{jira.emailAddress} but the output is simply blank.

Appreciate the help and time!

1 answer

0 votes
Luc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 27, 2022

Some more information on this front, I was able to set the logging to use only %X by itself to include the full contents of the map and it doesn't seem like the email is available in that map.  So now I'm wondering if there is a way to add information to that JIRA map and if so how?

Suggest an answer

Log in or Sign up to answer