Skip to content
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

ARTEMIS-2477 - create a less verbose and more descriptive warning whe… #2827

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -410,6 +410,15 @@ public interface ActiveMQClientLogger extends BasicLogger {
format = Message.Format.MESSAGE_FORMAT)
void confirmationNotSet();

@LogMessage(level = Logger.Level.WARN)
@Message(id = 212075, value = "KQueue is not available, please add to the classpath or configure useKQueue=false to remove this warning",
format = Message.Format.MESSAGE_FORMAT)
void unableToCheckKQueueAvailabilityNoClass();

@LogMessage(level = Logger.Level.WARN)
@Message(id = 212076, value = "epoll is not available, please add to the classpath or configure useEpoll=false to remove this warning",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Epoll

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will merge it with some git-fu,

./scripts/checkout-PR.sh 2827
# ammend myself
git commit -a --amend
./scripts/merge-branch 2827
git push apache master

format = Message.Format.MESSAGE_FORMAT)
void unableToCheckEpollAvailabilitynoClass();

@LogMessage(level = Logger.Level.ERROR)
@Message(id = 214000, value = "Failed to call onMessage", format = Message.Format.MESSAGE_FORMAT)
Expand Down
Expand Up @@ -34,6 +34,9 @@ public class CheckDependencies {
public static final boolean isEpollAvailable() {
try {
return Env.isLinuxOs() && Epoll.isAvailable();
} catch (NoClassDefFoundError noClassDefFoundError) {
ActiveMQClientLogger.LOGGER.unableToCheckEpollAvailabilitynoClass();
return false;
} catch (Throwable e) {
ActiveMQClientLogger.LOGGER.unableToCheckEpollAvailability(e);
return false;
Expand All @@ -43,6 +46,9 @@ public static final boolean isEpollAvailable() {
public static final boolean isKQueueAvailable() {
try {
return Env.isMacOs() && KQueue.isAvailable();
} catch (NoClassDefFoundError noClassDefFoundError) {
ActiveMQClientLogger.LOGGER.unableToCheckKQueueAvailabilityNoClass();
return false;
} catch (Throwable e) {
ActiveMQClientLogger.LOGGER.unableToCheckKQueueAvailability(e);
return false;
Expand Down