Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira log files have different time formats

Magnus Tamm September 19, 2019

Hi

I have a question about Jira logging. 

In server i have 3 types of log files and all of them have 3 types of time formats

1. Access_log ( [27/Aug/2019:20:53:29 +0300] )

2. Atlassian-Jira-gc... ( 2019-09-19T10:30:30.715+0300 )

3. Catalina.out ( Sep 17, 2019 9:26:40 AM )

 

Is there any way to change these time formats all same because this company where I work has strict policies and it's required to log all file the same time format.

 

Best Wishes

Magnus

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2019

Yes, these can be changed, and I'd really appreciate it if they were standardised too.  Much as I appreciate the simplicity and speed of a raw unprocessed log, and one log style does not fit all, I do wish the world of computing would at least stick to a single date style. (Anything but a US style date would work - a date/time should always be most significant to least, or the opposite.  Never middle-significance, least, most - that's inarguably wrong). 

The reason we get different styles is that there are three (well, more) "technologies" involved.

Jira (Atlassian) runs on Tomcat (Apache), which runs in a Java Virtual Machine (several vendors, but they tend to use the same date formats)

  • The JVM is generating the GC logs
  • Tomcat is generating the access and catalina logs
  • You didn't mention it, but Jira is generating a pile of logs in <jira home>/log as well, and those start with "2019-09-20 00:34:41,793" - yet another one.

I don't know what to do with the GC logs, I've not delved into java enough. 

Tomcat logging I have changed and I started with (an older version of) https://tomcat.apache.org/tomcat-8.5-doc/logging.html  

Most Atlassian applications use log4j (although I think they're moving away from it).  I've not messed with the dates in that, but I am sure you can, and it is at least all in one place - the applications that do use it all have a "log4j.properties" file somewhere.

Magnus Tamm October 22, 2019

Found that access log get's it format from server.xml but the date part in there is just described as "%t". Can I modify this? 

Suggest an answer

Log in or Sign up to answer