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

optimize: fix wrong usage of Slf4j #1654

Merged
merged 5 commits into from
Sep 17, 2019
Merged

Conversation

chenxi-null
Copy link
Contributor

There are several places that are not correct for the use of Slf4j.

They log error log like this:

LOGGER.error("", "send response error", throwable);

It will print log like below, missing the log message:

[main] ERROR TmpTest -
java.lang.RuntimeException: xx
	at TmpTest.<init>(TmpTest.java:28)
	...... ignore exception stack ......

I correct it like this:

LOGGER.error("send response error", throwable);

So, it will print the expected log content:

[main] ERROR TmpTest - send response error
java.lang.RuntimeException: xx
	at TmpTest.<init>(TmpTest.java:28)
	...... ignore exception stack ......

@codecov-io
Copy link

codecov-io commented Sep 14, 2019

Codecov Report

Merging #1654 into develop will increase coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1654      +/-   ##
=============================================
+ Coverage      47.37%   47.39%   +0.02%     
  Complexity      1777     1777              
=============================================
  Files            362      362              
  Lines          13151    13151              
  Branches        1626     1626              
=============================================
+ Hits            6230     6233       +3     
+ Misses          6247     6245       -2     
+ Partials         674      673       -1
Impacted Files Coverage Δ Complexity Δ
...ava/io/seata/core/rpc/netty/RmMessageListener.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...main/java/io/seata/core/rpc/netty/RmRpcClient.java 29.29% <0%> (ø) 10 <0> (ø) ⬇️
...a/io/seata/core/rpc/netty/AbstractRpcRemoting.java 9.95% <0%> (ø) 3 <0> (ø) ⬇️
...eata/core/rpc/netty/AbstractRpcRemotingClient.java 18.91% <0%> (ø) 6 <0> (ø) ⬇️
...ata/core/rpc/DefaultServerMessageListenerImpl.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...server/store/file/FileTransactionStoreManager.java 47.03% <0%> (+1.04%) 19% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 677d894...5514702. Read the comment docs.

Copy link
Contributor

@lightClouds917 lightClouds917 left a comment

Choose a reason for hiding this comment

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

Do not use import xxx.*

@chenxi-null
Copy link
Contributor Author

@lightClouds917 @xingfudeshi
Thanks for your suggestion, I have changed the code to fix the problem that you pointed out.

Copy link
Contributor

@zjinlei zjinlei left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

None yet

6 participants