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

Structure logging to json #217

Merged
merged 4 commits into from
Sep 20, 2020
Merged

Conversation

louyuting
Copy link
Collaborator

@louyuting louyuting commented Aug 27, 2020

Describe what this PR does / why we need it

format log to json.

2020-09-15T22:14:16.671    /Users/louyuting/Desktop/go/sentinel-golang/logging/logging.go:185    ERROR    test logging function    {"err":"error1","k1":"v1"}

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

@louyuting louyuting requested a review from sczyh30 August 27, 2020 13:47
@louyuting louyuting force-pushed the 20200817-logging-refine branch from 6af4dfe to ef0cc84 Compare August 31, 2020 16:12
@louyuting louyuting marked this pull request as ready for review August 31, 2020 16:13
@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2020

Codecov Report

Merging #217 into master will decrease coverage by 0.32%.
The diff coverage is 38.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
- Coverage   42.63%   42.30%   -0.33%     
==========================================
  Files          74       74              
  Lines        4356     3732     -624     
==========================================
- Hits         1857     1579     -278     
+ Misses       2266     1916     -350     
- Partials      233      237       +4     
Impacted Files Coverage Δ
api/tracer.go 28.57% <0.00%> (-8.93%) ⬇️
core/base/entry.go 50.00% <0.00%> (+1.28%) ⬆️
core/circuitbreaker/circuit_breaker.go 21.92% <0.00%> (-1.05%) ⬇️
core/flow/slot.go 0.00% <0.00%> (ø)
core/flow/tc_warm_up.go 0.00% <0.00%> (ø)
core/hotspot/cache/lru.go 50.58% <ø> (-3.19%) ⬇️
core/hotspot/concurrency_stat_slot.go 0.00% <0.00%> (ø)
core/hotspot/slot.go 34.14% <0.00%> (+0.81%) ⬆️
core/hotspot/traffic_shaping.go 60.13% <0.00%> (-3.02%) ⬇️
core/log/metric/aggregator.go 25.86% <0.00%> (-3.31%) ⬇️
... and 91 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 133bc9f...ad0af5e. Read the comment docs.

@louyuting louyuting added area/logging Issue related to logging of Sentinel to-review PRs to review labels Aug 31, 2020
@louyuting louyuting added this to the 0.6.0 milestone Aug 31, 2020
@louyuting louyuting force-pushed the 20200817-logging-refine branch from c93693a to 02c164b Compare September 1, 2020 13:55
@sczyh30 sczyh30 modified the milestones: 0.6.0, 1.0.0 Sep 2, 2020
@louyuting louyuting modified the milestones: 1.0.0, 0.7.0 Sep 2, 2020
@louyuting louyuting force-pushed the 20200817-logging-refine branch from 02c164b to e576bb6 Compare September 6, 2020 06:48
@louyuting louyuting modified the milestones: 0.7.0, 0.6.1 Sep 7, 2020
@louyuting louyuting force-pushed the 20200817-logging-refine branch from e576bb6 to e622a12 Compare September 8, 2020 17:02
@louyuting louyuting modified the milestones: 0.6.1, 0.7.0 Sep 10, 2020
@louyuting louyuting force-pushed the 20200817-logging-refine branch 3 times, most recently from 390edb9 to ccf21c5 Compare September 16, 2020 12:25
@louyuting louyuting force-pushed the 20200817-logging-refine branch from 5f10860 to ad0af5e Compare September 20, 2020 07:45
@sczyh30 sczyh30 added the kind/refactor Issue related to functional refactoring. label Sep 20, 2020
@sczyh30 sczyh30 removed this from the 0.7.0 milestone Sep 20, 2020
@sczyh30 sczyh30 added this to the 1.0.0 milestone Sep 20, 2020
Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit b5bbaa1 into alibaba:master Sep 20, 2020
@sczyh30
Copy link
Member

sczyh30 commented Sep 20, 2020

Nice work. Thanks!

@sczyh30 sczyh30 removed the to-review PRs to review label Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging Issue related to logging of Sentinel kind/refactor Issue related to functional refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provides logging component extension capabilities and Standardized log format
3 participants