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

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

change location of Bitbucket log direcotry

Defaultly the logs are stored under the Bitbucket Home directory. As the orgnistaions design we are forced to keep logs files in specific drive. 

For this I need to changes the ${log.dir} location.

I see following line in logback.xml but do not know how do I give value to log dir,


<define name="log.dir" class="com.atlassian.stash.internal.logback.LogDirectoryPropertyDefiner"


Help me to change the default log location

Platform is windows.

2 answers

In atlassian-bitbucket-5.2.2/app/WEB-INF/classes/logback.xml change:


Thanks for the reply Velle. 

I was already went through the article but did not wanted to specify locations at multiple files tags :)

Late to the party, but I've found a solution that should be documented. I was running into the same issue of not wanting to repeat the same location in multiple appender definitions. I was able to solve it by defining a variable in the logback.xml file.

Since Bitbucket Server uses Logback as its logging utility, I followed the Variable Substitution section of the Logback Configuration Documentation.

<property name="mylog.dir" value="/var/log/bitbucket"/>

Instead of the <define> tag that Atlassian uses to import their pre-defined variables (like log.dir), Logback can also use the <property> tag to define a local variable that can then be access using ${mylog.dir}.

This can then be used in an appender definition such as the following:

<appender name="bitbucket.application" class="ch.qos.logback.core.FileAppender">

Alleviating the need to repeat the same location many times!

I've done this successfully on Bitbucket Server 7.2 within the local logback.xml file within my <bitbucket-home> directory. I'm not sure if this solution was a possibility back in Bitbucket Server 5.2 from the other answer.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,849 views 0 7
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