Sonar4Stash spams warning in Stash log

Hi Michael,

We are using Sonar4Stash and quite happy with the tool. Recently we were troubleshooting some Stash issue and find it difficult because Sonar4Stash spams the Stash log with warning message like the following, do you know how we ca get rid of those?

We are currently using Stash 3.3, Sonar4Stash 1.5. Thanks.

2016-09-20 18:28:10,934 WARN  [http-nio-7990-exec-13] tleung @J3E4C7x1108x6798x4 1o79is7 127.0.0.1 "GET /rest/sonar4stash/latest/statistics HTTP/1.1" c.m.s.s.sonar.component.MavenProject SONAR: no component key found for file com.ecoptions.indexarbui.product/res/changelog
...
2016-09-20 18:28:10,934 WARN  [http-nio-7990-exec-13] tleung @J3E4C7x1108x6798x4 1o79is7 127.0.0.1 "GET /rest/sonar4stash/latest/statistics HTTP/1.1" c.m.s.s.sonar.component.MavenProject SONAR: no component key found for file com.ecoptions.indexarbui.product/res/changelog
...

1 answer

1 accepted

Hi Terry,

This log message appears because the plug-in was not able to find any information for this file in SonarQube. In your case, this is not an issue because changelog sounds like a text file that is not being analyzed by SonarQube, so there is no information for it. But for other cases, this could be an important debugging information.

I think we will change the severity for this message to INFO or DEBUG for the next release in order to avoid generating a lot of false positives in the log. In the meantime the only possibility to get rid of these messages is to set the logging level for the plug-in to ERROR:

$ curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://YOUR_BITBUCKET_SERVER_IP/bitbucket/rest/api/latest/logs/logger/ch.mibex.stash.sonar4stash/error

This command should result in a HTTP return code of 204.

Hope this helps.

Best regards,

Michael

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 9 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

34 views 0 3
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