★ wanayoo — archive 1999 https://github.com/microsoft/java-debug/pull/47Nouvelle recherche | Portail wanayoo
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

add set log level handler for setting log level from vscode side. #47

Merged
merged 4 commits into from Sep 25, 2017
Merged

Conversation

@andxu
Copy link
Collaborator

@andxu andxu commented Sep 25, 2017

No description provided.

@msftclas
Copy link

@msftclas msftclas commented Sep 25, 2017

@andxu,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

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)));

This comment has been minimized.

@akaroml

akaroml Sep 25, 2017
Member

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)));

This comment has been minimized.

@akaroml

akaroml Sep 25, 2017
Member

It should be an error.

}

} else {
logger.warning(String.format("Invalid parameters for configLogLevel: %s", StringUtils.join(arguments)));

This comment has been minimized.

@akaroml

akaroml Sep 25, 2017
Member

It should be an error.

@andxu andxu merged commit 0efb623 into master Sep 25, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@andxu andxu deleted the andy_log branch Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.