Is it possible to increase the verbosity of atlassian-stash-access.log

We are finding some of the entries ambiguos as to what kind of operations are actually taking place based on atlassian-stash-access.log entries

access-log format:

ip address | protocol | request id | username | date/time | action | request details | labels | response time (ms) | session-id

## a "real" clone attempt: git clone ssh://git@stash.local:7999/ap/apple-core.git apple-core

10.10.10.206 | ssh | o659x12230x3 | jdoe | 2013-10-03 10:59:58,498 | SSH - git-upload-pack '/ap/apple-core.git' | - | clone | 25963 | 1pkur6z |

## git fetch --all

10.10.10.206 | ssh | o667x12286x2 | jdoe | 2013-10-03 11:07:06,190 | SSH - git-upload-pack '/ap/apple-core.git' | - | clone | 159 | nhtauz |

## why is THIS one labeled 'fetch'?

10.10.10.45 | ssh | o662x12273x1 | deployuser | 2013-10-03 11:02:59,934 | SSH - git-upload-pack '/svr/core.git' | - | fetch | 23817 | 1surbyu |

2 answers

Yes. All Atlassian products are based off Log4J. In the app, go to "Admin" -> Support -> Logging and Profiling. Those are the dynamic things that you can flip on/off. Beyond that, other things would need to be done with the log4j stuff and would require a restart.

If you go in to $APP_HOME/atlassian-stash/WEB-INF/classes and look for "logback.xml." At the bottom you can set your log levels. Restart and check. Of course test it in test first to make sure you feel comfortable with it.

Just a few notes for people reading this answer.

Firstly Stash actually uses Logback, which is the successor of Log4j.

Secondly I would highly recommend you don't modify the logback.xml file you mentioned. Not because it's dangerous, but because on every upgrade you'll have to reapply your changes to that file. Instead if you just want to change the levels we recommend you modify the stash-config.properties file.

https://confluence.atlassian.com/display/STASH/Stash+config+properties#Stashconfigproperties-Logging

If you need more control you can also add different appenders in a logback include file:

https://answers.atlassian.com/questions/188880/how-do-i-control-logging-in-an-atlassian-stash-plugin

Cheers,

Charles

Hi Zachary,

I believe you're seeing a minor glitch in how we handled the classification of fetches (just for SSH). This should be fixed in Stash 2.8 which was released just this week.

Cheers,

Charles

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

659 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot