It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira log files have different time formats

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

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.

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
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

864 views 6 24
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you