-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce log level when loading blacklist to INFO from ERROR #1522
Conversation
…is not found or can't be loaded
@miguno i've updated this as per discussion on #1427 |
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.
LGTM, thanks!
Is there any specific reason to change it to |
@hjafarpour yeah you are correct, it should be warn. |
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.
LGTM, though I think your log level is wrong...
logger.error("failed to load resource blacklist from " + inputFile | ||
+ " all classes will be blacklisted"); | ||
} catch (final IOException e) { | ||
logger.warn("Failed to load resource blacklist from {}" |
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.
This exception occurs if ext/resource-blacklist.txt
exists, but errors occur processing it. That's an error in my book, not a warning.
I think you're right to log at INFO
level if the blacklist file doesn't exist. As I would expect to be able to remove the blacklist by removing the file.
However, if I create a file with the wrong permissions for example, then it should be an ERROR
.
Fixes #1515
Testing done
Updated unit test
Reviewer checklist