-
Notifications
You must be signed in to change notification settings - Fork 0
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 a warning message for -s
option
#51
Conversation
939d775
to
906a08c
Compare
src/main/resources/log4j2.properties
Outdated
# The root logger with appender name | ||
rootLogger = INFO, STDOUT | ||
|
||
# Assign STDOUT a valid appender & define its layout | ||
appender.console.name = STDOUT | ||
appender.console.type = Console | ||
appender.console.layout.type = PatternLayout | ||
appender.console.layout.pattern = %msg%n |
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.
we forgot to update the property file when we upgraded log4j to version 2.
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! Thank you!
FYI: I was able to see the warning message in my local environment as follows!
$ java -jar build/libs/scalar-admin-2.2.0-all.jar -s localhost -c pause
Warning: --srv-service-url, -s will be deprecated in the future. We recommend using --addresses, -a instead.
@@ -107,6 +111,9 @@ public Integer call() { | |||
throw new IllegalArgumentException( | |||
"It's required to specify only either [--srv-service-url, -s] or [--addresses, -a]."); | |||
} else if (srvServiceUrl != null) { | |||
logger.error( |
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.
logger.error( | |
logger.warn( |
Why do you use error
?
Also, I don't think we need Warnings:
header since it's done by the logger.
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.
Sorry, it was my typo. It should be warn
.
(I remembered I used warn
though, anyway.)
Also, I don't think we need Warnings: header since it's done by the logger.
Ah, I see. I did this because I configured the log4j2 output pattern to be just plaintext.
I made a change according to this comment at 27315b4
Please take a look 🙇
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! Thank you!
Description
This PR adds a warning message when the users use the
-s
option. This is advised in #50Related issues and/or PRs
#50
Changes made
Checklist