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

[Enhancement] Optimizing Log Printing Using the LogUtils #4502

Closed
2 of 3 tasks
mxsm opened this issue Oct 22, 2023 · 5 comments · Fixed by #4507
Closed
2 of 3 tasks

[Enhancement] Optimizing Log Printing Using the LogUtils #4502

mxsm opened this issue Oct 22, 2023 · 5 comments · Fixed by #4507
Assignees
Labels
enhancement New feature or request good first issue Issues for first-time contributors

Comments

@mxsm
Copy link
Member

mxsm commented Oct 22, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Enhancement Request

Currently in the project, most places determine whether to print logs through conditional checks. Now there is a common utility class LogUtils to handle these conditional checks. This makes the code look much simpler.

Describe the solution you'd like

current situation

image

After settlement

image

Note: Developers need to judge whether each place needs to be changed. For example, some prints are mandatory and do not need conditional checks, so there is no need to change them.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@mxsm mxsm added enhancement New feature or request good first issue Issues for first-time contributors labels Oct 22, 2023
@scwlkq
Copy link
Contributor

scwlkq commented Oct 22, 2023

i will try this

@Pil0tXia
Copy link
Member

@scwlkq Welcome to EventMesh community, my friend!

@mxsm
Copy link
Member Author

mxsm commented Oct 22, 2023

@scwlkq Welcome to EventMesh community!

@luahan77m
Copy link

Hi, I'm new to open source and want to try to solve some simple problems. Can you assign this issue to me? I would appreciate it!

@scwlkq
Copy link
Contributor

scwlkq commented Oct 28, 2023

Hi, I'm new to open source and want to try to solve some simple problems. Can you assign this issue to me? I would appreciate it!

Hello, I am also a newcomer to the community. I have previously claimed this task. In fact, I have already written about it, and the code volume is a bit large.

xwm1992 pushed a commit that referenced this issue Oct 31, 2023
* Change the log mode to LogUtils

* check code style

* recheck

* fix some code style inappropriate places

* temp store

* fix merge conflict

* final check

* fix some field sequence problems and redundant indention problems

* Remove unnecessary parameters from the log

* fix merge conflict

* fix merge conflict

* fix merge conflict

* correct code style

* fix ci

* add missing {} in some log statements

* fix ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Issues for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants