-
Notifications
You must be signed in to change notification settings - Fork 185
add set log level handler for setting log level from vscode side. #47
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
Conversation
|
@andxu, |
| if (arguments != null && arguments.size() == 1 && arguments.get(0) instanceof String) { | ||
| try { | ||
| logger.setLevel(Level.parse((String) arguments.get(0))); | ||
| logger.warning(String.format("Set log level to : %s", arguments.get(0))); |
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.
why is this a warning?
info is enough to tell the user the log level is set to whatever they specified.
| logger.warning(String.format("Set log level to : %s", arguments.get(0))); | ||
| return logger.getLevel().toString(); | ||
| } catch (IllegalArgumentException e) { | ||
| logger.warning(String.format("Invalid log level: %s", arguments.get(0))); |
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.
It should be an error.
| } | ||
|
|
||
| } else { | ||
| logger.warning(String.format("Invalid parameters for configLogLevel: %s", StringUtils.join(arguments))); |
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.
It should be an error.
No description provided.