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

feat(logger): remove x-cray/logrus-prefixed-formatter #5690

Merged
merged 7 commits into from
Aug 17, 2023

Conversation

d4x1
Copy link
Contributor

@d4x1 d4x1 commented Jul 18, 2023

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

What does this PR do?

Fix #5666

Does this close any open issues?

Closes #5666

Screenshots

Include any relevant screenshots here.
image

Other Information

Any other information that is important to this PR.

@d4x1
Copy link
Contributor Author

d4x1 commented Jul 18, 2023

Before
time="2023-07-18 18:24:41" level=info msg=xxx
After
time="2023-07-18 18:26:09" level=info msg=xxx func="github.com/apache/incubator-devlake/impls/logruslog.(*DefaultLogger).Log" file="/Users/username/Code/go/src/github.com/merico-dev/lake/backend/impls/logruslog/logger.go:58"

cc @ZhangNing10

@klesh
Copy link
Contributor

klesh commented Jul 20, 2023

@d4x1 Is the func/file always pointing to the logruslog logger?

@d4x1
Copy link
Contributor Author

d4x1 commented Jul 20, 2023

I have searched this repo, only logrus was found, all logger is inited in package logruslog.

And I run the devlake backend, logger in handlers and plugins are both worked as expected.

@keon94 keon94 added this to the v0.19 milestone Jul 25, 2023
keon94
keon94 previously approved these changes Jul 25, 2023
Copy link
Contributor

@keon94 keon94 left a comment

Choose a reason for hiding this comment

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

LGTM

@keon94
Copy link
Contributor

keon94 commented Jul 25, 2023

@d4x1 Please run go mod tidy in backend/ to get rid of github.com/x-cray/logrus-prefixed-formatter from the dependency list in go.mod. Otherwise, it looks good.

@d4x1
Copy link
Contributor Author

d4x1 commented Jul 26, 2023

Please don't merge this PR, I find the line number is always backend/impls/logruslog/logger.go:58, it needs a further update.

@d4x1 d4x1 changed the title feat(logger): add filename and line number when logging feat(logger): remove x-cray/logrus-prefixed-formatter Aug 15, 2023
@klesh klesh merged commit fe1c710 into apache:main Aug 17, 2023
9 checks passed
@d4x1 d4x1 added the pr-type/feature-development This PR is to develop a new feature label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-type/feature-development This PR is to develop a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Backend] log with line number
4 participants