-
Notifications
You must be signed in to change notification settings - Fork 12k
[ROCKETMQ-158]Remove logback dependency for rocketmq-tools #85
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
1 similar comment
2 similar comments
2 similar comments
|
The logic here shares much similar logic with ClientLogger class, can we extract the common part into a reusable method? |
|
So do you agree this is indeed an issue that needed to be solved? If yes, I will try doing that. But actually it is a little different from the clientLogger since clientlogger will use the resources file in the classpath by default while tools admin does not have config file in the classpath. |
Changing specific dependency to a neutral logging framework is good to have as application developer may integrate tool module to their operation management system.
I know this, but it does not look like a blocking issue. |
|
please review the updated pr |
|
The conf folder has been moved to the distribution module, please rebase this PR on top of develop branch. I'll +1 thereafter. |
| final String logfjConfigPath = rocketmqHome + "/conf/log4j_tools.xml"; | ||
| LogUtils.configLog4j(logfjConfigPath,null); | ||
| } else if (classType.getName().equals("ch.qos.logback.classic.LoggerContext")) { | ||
| Class<?> joranConfigurator; |
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.
Could we extract this log loader logic into one place
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.
Yes, we may wrap here further @Jaskey
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.
@vongosling the updated pr has been extract two logger config into util function. Do you mean the if else code snippet is need to wrap too?
|
@lizhanhui please review the updated pr, log4j_tools.xml has been move to distributions. |
1 similar comment
| public class LogUtils { | ||
|
|
||
| /** | ||
| * config logback dymatically from provided file path, otherwise try to config from resource file |
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.
Typo here: dymatically --> dynamically
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.
Thank you! I will update the commit soon.
| } | ||
|
|
||
| /** | ||
| * config log4j dymatically from provided file path, otherwise try to config from resource file. Notice that the log4j configuration file should be in xml format |
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.
dymatically same as above.
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.
Fixed, thank you!
|
+1 |
2 similar comments
|
@zhouxinyu @shroman @vongosling |
|
+1 |
|
Hi @Jaskey Sorry to reply late, could you please resolve the conflicts, so we could merge this PR quickly. |
|
@Jaskey Could you pick up this pr |
|
@zhouxinyu @vongosling , conflicts have been resolved, please review again. thank you |
|
@Jaskey I will close the pr, if you happened to the same question, please let me know. |
jira: https://issues.apache.org/jira/browse/ROCKETMQ-158