Skip to content

Conversation

@Jaskey
Copy link
Contributor

@Jaskey Jaskey commented Mar 28, 2017

@coveralls
Copy link

coveralls commented Mar 28, 2017

Coverage Status

Coverage increased (+0.03%) to 31.644% when pulling b5876bb on Jaskey:ROCKETMQ-158 into 203cb30 on apache:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 31.644% when pulling b5876bb on Jaskey:ROCKETMQ-158 into 203cb30 on apache:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 31.662% when pulling 53bb2a6 on Jaskey:ROCKETMQ-158 into 203cb30 on apache:develop.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 31.662% when pulling 53bb2a6 on Jaskey:ROCKETMQ-158 into 203cb30 on apache:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 31.662% when pulling 53bb2a6 on Jaskey:ROCKETMQ-158 into 203cb30 on apache:develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 31.829% when pulling b7218ae on Jaskey:ROCKETMQ-158 into 7e37799 on apache:develop.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 31.829% when pulling b7218ae on Jaskey:ROCKETMQ-158 into 7e37799 on apache:develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 31.829% when pulling b7218ae on Jaskey:ROCKETMQ-158 into 7e37799 on apache:develop.

@lizhanhui
Copy link
Contributor

The logic here shares much similar logic with ClientLogger class, can we extract the common part into a reusable method?

@Jaskey
Copy link
Contributor Author

Jaskey commented Mar 29, 2017

@lizhanhui

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.

@lizhanhui
Copy link
Contributor

So do you agree this is indeed an issue that needed to be solved? If yes, I will try doing that.

Changing specific dependency to a neutral logging framework is good to have as application developer may integrate tool module to their operation management system.

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.

I know this, but it does not look like a blocking issue.

@coveralls
Copy link

coveralls commented Mar 29, 2017

Coverage Status

Coverage decreased (-0.08%) to 31.791% when pulling 3d3801b on Jaskey:ROCKETMQ-158 into 7e37799 on apache:develop.

@Jaskey
Copy link
Contributor Author

Jaskey commented Mar 29, 2017

@lizhanhui

please review the updated pr

@lizhanhui
Copy link
Contributor

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

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

Copy link
Contributor

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

Copy link
Contributor Author

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?

@Jaskey
Copy link
Contributor Author

Jaskey commented Mar 29, 2017

@lizhanhui please review the updated pr, log4j_tools.xml has been move to distributions.

@coveralls
Copy link

coveralls commented Mar 29, 2017

Coverage Status

Coverage increased (+0.008%) to 31.788% when pulling 980c1a3 on Jaskey:ROCKETMQ-158 into ab01386 on apache:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 31.788% when pulling 980c1a3 on Jaskey:ROCKETMQ-158 into ab01386 on apache:develop.

public class LogUtils {

/**
* config logback dymatically from provided file path, otherwise try to config from resource file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here: dymatically --> dynamically

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dymatically same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thank you!

@lizhanhui
Copy link
Contributor

+1

@coveralls
Copy link

coveralls commented Apr 14, 2017

Coverage Status

Coverage increased (+2.8%) to 34.628% when pulling 4449b2b on Jaskey:ROCKETMQ-158 into ab01386 on apache:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.8%) to 34.601% when pulling 6647aeb on Jaskey:ROCKETMQ-158 into ab01386 on apache:develop.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+2.8%) to 34.601% when pulling 6647aeb on Jaskey:ROCKETMQ-158 into ab01386 on apache:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.8%) to 34.601% when pulling 6647aeb on Jaskey:ROCKETMQ-158 into ab01386 on apache:develop.

@Jaskey
Copy link
Contributor Author

Jaskey commented Apr 19, 2017

@zhouxinyu @shroman @vongosling
what's your advice guys?

@vongosling
Copy link
Member

+1

@zhouxinyu
Copy link
Member

Hi @Jaskey

Sorry to reply late, could you please resolve the conflicts, so we could merge this PR quickly.

@zhouxinyu zhouxinyu closed this Dec 1, 2017
@zhouxinyu zhouxinyu reopened this Dec 1, 2017
@vongosling
Copy link
Member

@Jaskey Could you pick up this pr

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 39.908% when pulling 3327b9a on Jaskey:ROCKETMQ-158 into cc0b3d0 on apache:develop.

@Jaskey
Copy link
Contributor Author

Jaskey commented Jan 5, 2018

@zhouxinyu @vongosling , conflicts have been resolved, please review again. thank you

@vongosling
Copy link
Member

@Jaskey I will close the pr, if you happened to the same question, please let me know.

@vongosling vongosling closed this Jul 14, 2018
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