Skip to content

Cloudstack 8656 adding messages to empty catch blocks#637

Merged
asfgit merged 3 commits into
apache:masterfrom
DaanHoogland:CLOUDSTACK-8656
Jul 30, 2015
Merged

Cloudstack 8656 adding messages to empty catch blocks#637
asfgit merged 3 commits into
apache:masterfrom
DaanHoogland:CLOUDSTACK-8656

Conversation

@DaanHoogland
Copy link
Copy Markdown
Contributor

filling empty catch clauses with log messages

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@wilderrodrigues @wido @bhaisaab @rajesh-battala @koushik-das @kishankavala @K0zka
I am taking this by exception type now so this is going to give conflicts pretty soon. I will continue on file by file basis to reduce the chances for that.

@DaanHoogland DaanHoogland changed the title Cloudstack 8656 Cloudstack 8656 adding messages to empty catch blocks Jul 29, 2015
@asfbot
Copy link
Copy Markdown

asfbot commented Jul 29, 2015

cloudstack-pull-rats #151 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 29, 2015

cloudstack-pull-requests #849 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 29, 2015

cloudstack-pull-rats #152 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 29, 2015

cloudstack-pull-requests #850 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 29, 2015

cloudstack-pull-analysis #84 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 29, 2015

cloudstack-pull-analysis #85 SUCCESS
This pull request looks good

@koushik-das
Copy link
Copy Markdown
Contributor

Since all these "ignore" messages are logged at INFO level, it needs to be ensured that logs are not getting filled up too soon. Also I see lot of instances for InterruptedException, I think they can they be excluded.

@wilderrodrigues
Copy link
Copy Markdown
Contributor

Hi @DaanHoogland

Nice you took time to have a look at those. It really helps sys admins to know what is going on with ACS. However, I would rather have them logged as WARN over INFO. Why? Because if we fall into the catch block, is because something went wrong or might probably require manual intervention. If you agree, would that be a lot of work to change them into WARN?

Concerning the logs getting filled up too soon, I wouldn't really bother. From my point of view that's an admin task to have a clever rotation of logs. If ACS code base was more robust, we could afford less logs and filling up files wouldn't be a problem. But since it isn't, let's make sure the users/admins are aware about what is happening.

With respect to the InterruptedExceptions, we can log them as debug, but ignoring them completely wouldn't be nice.

Cheers,
Wilder

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@koushik-das, Ignoring interrupted exceptions means that you do not allow the user or other threads to interrupt you. To me that seems serious. I did not in any case see comment about why it was done so I rigorously added the messages.
As for level; On one hand you are right @wilderrodrigues , as some errors that have been ignored in the past have been problems. On the other hand, someone did think it was safe to ignore those errors. The real job is to asses all the messages on level but I regard that out of scope for this PR. Maybe some of them should be WARN or even ERROR and others merely DEBUG or TRACE. I put the tag [ignored] there so we know we must considder them for either proper handling or another level of logging.

@wilderrodrigues
Copy link
Copy Markdown
Contributor

Fair enough, @DaanHoogland

Thanks for the exaplanation. :)

LGTM 👍

@kishankavala
Copy link
Copy Markdown
Contributor

@DaanHoogland
Agreed that setting appropriate log level is out of the scope for this PR. But we should file a jira ticket to track and address it before next release.

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

@kishankavala you actually made me think I should wait till after 4.6, on the other hand we will have to take the pain in a release.

@wido
Copy link
Copy Markdown
Contributor

wido commented Jul 30, 2015

Code wise it is LGTM

@wilderrodrigues
Copy link
Copy Markdown
Contributor

@kishankavala @DaanHoogland 👍 for the Jira ticket.

After 4.6 we can come back to this and assess the messages accordingly. But would be nice to have the logs in systems running 4.6.

Cheers,
Wilder

@koushik-das
Copy link
Copy Markdown
Contributor

Changes LGTM, since we are creating a separate bug for correctly handling log levels.
@DaanHoogland I am not saying to remove the interrupted exceptions, just that logging messages for them may not be needed. But I agree with @wilderrodrigues that log level for these may be changed to DEBUG

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

So @koushik-das Do you propose the folowing?

  • merge this for 4.6
  • make a critical ticket for 4.7 to asses log levels
    note that I am not completely done yet and will have addressed all but the hyperv console before the end of the weekend hopefully.

@koushik-das
Copy link
Copy Markdown
Contributor

@DaanHoogland Merge this in 4.6. If possible push the log level changes in 4.6 as well.

@DaanHoogland
Copy link
Copy Markdown
Contributor Author

So I will amend the interrupted to be level debug and then merge. next I will create a new PR for any remaining empty catch blocks, @koushik-das.

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 30, 2015

cloudstack-pull-rats #163 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 30, 2015

cloudstack-pull-requests #861 SUCCESS
This pull request looks good

@asfbot
Copy link
Copy Markdown

asfbot commented Jul 30, 2015

cloudstack-pull-analysis #96 SUCCESS
This pull request looks good

@asfgit asfgit merged commit e2b6237 into apache:master Jul 30, 2015
asfgit pushed a commit that referenced this pull request Jul 30, 2015
Cloudstack 8656 adding messages to empty catch blocks

* pr/637:
  CLOUDSTACK-8656: debug messages on interupted exceptions
  CLOUDSTACK-8656: code in comment removed
  CLOUDSTACK-8656: filling empty catch block with info messages  using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
yadvr pushed a commit that referenced this pull request Jan 20, 2021
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants