The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Can I make the log format read as JSON?

Fernando Garcia
February 25, 2021

Hi everybody, 

 

Is it possible to configure Jira's logging properties or their log4j format into JSON? Instead of the standard server logs coming in by default, I want them to be in json. 

 

I can't seem to find any documents that help explain how to map the values into a json format. Also, where would one configure this? In the server.xml file? logging.properties file? or the log4j.properties file? 

 

Thanks! 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ben R
Contributor
July 30, 2024

I guess that's a no then? :(

I've tried creating a test appender (based on filelog) switching out the PatternLayout for <JSONLayout /> and while it creates the file, it doesn't look to be printing out anything in a JSON format, e.g:

INFO: Waiting for AO
INFO: Initialization started
INFO: loadGitManagersFromDatabase
INFO: Run migrations
INFO: Start clusterInitializer
INFO: initRoutine is executed
Scheduling automation rule scheduler job
Success automation rule scheduler job
INFO: startRoutine is executed
INFO: plugin startup completed!
Waiting for jql functions registration
CSSErrorListener full context |
CSSErrorListener ambiguity |
CSSErrorListener full context |
CSSErrorListener ambiguity |
CSSErrorListener full context |
CSSErrorListener ambiguity |
CSSErrorListener full context |
CSSErrorListener ambiguity |

 

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events