Sonar4Stash spams warning in Stash log

Terry Leung September 21, 2016

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
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2016

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
TAGS
AUG Leaders

Atlassian Community Events