-
Notifications
You must be signed in to change notification settings - Fork 81
Log messages refienement. #184
Log messages refienement. #184
Conversation
@@ -213,7 +213,7 @@ private void postIssueComment(PullRequestRef pr, | |||
// check if issue belongs to the Stash diff view | |||
IssueType type = diffReport.getType(path, issueLine, config.issueVicinityRange()); | |||
if (type == null) { | |||
LOGGER.info( | |||
LOGGER.debug( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree with this being only debug.
When we can not add the comment for the diff view this is mostly likely a misconfiguration of sonar-stash or the whole sonarqube scan.
Could you elaborate more on your reasoning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it is something normal and can happen. I guess the logic is that sonar scan can find issues which weren't introduced in the current pull request, so they aren't in the diff and these issues are excluded.
If the reason is a misconfiguration I would use WARN level here to indicate this is a problem. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@t-8ch any views on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. yes.
This can normally happen but should not commonly. The most common case is in case of misconfigurations.
It's not clear which level to choose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, understand, so I'll leave it as Info. Thanks for response.
@@ -225,7 +225,7 @@ private void postIssueComment(PullRequestRef pr, | |||
.postCommentLineOnPullRequest(pr, commentContent, path, line, type); | |||
|
|||
LOGGER | |||
.debug("Comment \"{}\" has been created ({}) on file {} ({})", issueKey, type, path, line); | |||
.info("Comment \"{}\" has been created ({}) on file {} ({})", issueKey, type, path, line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
if (LOGGER.isDebugEnabled()) { | ||
LOGGER.debug("Comment \"{}\" has been linked to a Stash task", comment.getId()); | ||
if (LOGGER.isInfoEnabled()) { | ||
LOGGER.info("Comment \"{}\" has been linked to a Stash task", comment.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
be34fc6
to
1da4fa9
Compare
@t-8ch pull request amended according to our previous discussion. I kindly request for the merge. |
Pull Request code was tested on running Sonar instance (version 6.7.3). Changes work as expected and they satisfy user requirements.
Closes #183