How to change time format of the audit log in Bitbucket Server
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