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

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

1 vote
Answer 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
Community showcase
Published in Marketplace Apps & Integrations

Marketplace Spotlight: Manage your assets with asset management apps

  The role of IT professionals has become increasingly difficult over the last decade. Our organizations work in an increasingly software-powered world and IT professionals are expected to not...

279 views 3 9
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