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

0 votes
Ben Robbins
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 |

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events