Skip to content

Conversation

@andxu
Copy link
Contributor

@andxu andxu commented Sep 25, 2017

No description provided.

@msftclas
Copy link

@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

testforstephen
testforstephen previously approved these changes Sep 25, 2017
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)));
Copy link
Member

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)));
Copy link
Member

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)));
Copy link
Member

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.

@andxu andxu merged commit 0efb623 into master Sep 25, 2017
@andxu andxu deleted the andy_log branch September 25, 2017 13:04
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.

5 participants