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

fix: change default minimum log level to TRACE #1050

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

imbajin
Copy link
Member

@imbajin imbajin commented Jun 20, 2020

Log4j2 has 8 log levels: ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF (from low to high)

  1. change minimum level from INFO to TRACE to allow print DEBUG & TRACE log
  2. change graph/*API Log print class to themselves instead of RestServer.class

And we lack TRACE level logs now, so that the DEBUG output is too much (almost can't be directly opened)

My temporary solution is to dynamically modify the log level of specified classes to DEBUG through Arthas like this:

# 1.Change the same prefix classes log level together
$ logger -n com.baidu.hugegraph.api.graph -l debug

# 2.Only change one class
$ logger -n com.baidu.hugegraph.api.graph.VertexAPI -l debug

That's why we should let different class print its own logs separately(especially for thoses output a lot of logs), otherwise we have to change RestServer.class to debug, and it will print a lot of useless log.

@codecov
Copy link

codecov bot commented Jun 22, 2020

Codecov Report

Merging #1050 into master will increase coverage by 2.77%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1050      +/-   ##
============================================
+ Coverage     66.38%   69.16%   +2.77%     
- Complexity     5295     5445     +150     
============================================
  Files           329      329              
  Lines         26424    26424              
  Branches       3776     3776              
============================================
+ Hits          17542    18276     +734     
+ Misses         7151     6363     -788     
- Partials       1731     1785      +54     
Impacted Files Coverage Δ Complexity Δ
...n/java/com/baidu/hugegraph/api/graph/BatchAPI.java 27.41% <100.00%> (+1.61%) 0.00 <0.00> (ø)
...in/java/com/baidu/hugegraph/api/graph/EdgeAPI.java 54.68% <100.00%> (ø) 0.00 <0.00> (ø)
.../java/com/baidu/hugegraph/api/graph/VertexAPI.java 36.80% <100.00%> (ø) 0.00 <0.00> (ø)
...om/baidu/hugegraph/api/filter/ExceptionFilter.java 64.28% <0.00%> (-4.09%) 0.00% <0.00%> (ø%)
...c/main/java/com/baidu/hugegraph/task/HugeTask.java 69.76% <0.00%> (-0.34%) 69.00% <0.00%> (-1.00%)
...graph/backend/store/cassandra/CassandraTables.java 88.14% <0.00%> (+0.26%) 3.00% <0.00%> (ø%)
...om/baidu/hugegraph/task/StandardTaskScheduler.java 85.61% <0.00%> (+0.35%) 67.00% <0.00%> (ø%)
...egraph/backend/store/cassandra/CassandraStore.java 69.01% <0.00%> (+0.35%) 53.00% <0.00%> (+1.00%)
.../baidu/hugegraph/backend/query/ConditionQuery.java 86.20% <0.00%> (+0.43%) 101.00% <0.00%> (+1.00%)
.../hugegraph/backend/serializer/TableSerializer.java 87.90% <0.00%> (+0.53%) 61.00% <0.00%> (+1.00%)
... and 23 more

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 0db1aba...454744b. Read the comment docs.

@javeme javeme merged commit 81466fd into apache:master Jun 22, 2020
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

3 participants