How to change time format of the audit log in Bitbucket Server

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The audit log format in Bitbucket Server and Data Center 7 and newer is hardcoded internally and cannot be changed. By default the timestamp in audit log is in Unix format.

Environment

  • Bitbucket Server and Data Center version 7 and newer

Workaround

As a workaround, to change the timestamp from UNIX format to RFC-2822 (for example), you can use the following command:

awk -F'|' '{ print $1,"|",$2,"|",$3,"|",strftime("%c", $4),"|",$5,"|",$6,"|",$7,"|",$8; }' < atlassian-bitbucket-audit.log > atlassian-bitbucket-audit.log.date
Last modified on Apr 12, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.