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

Log formatter #681

Merged
merged 12 commits into from
Feb 27, 2023
Merged

Log formatter #681

merged 12 commits into from
Feb 27, 2023

Conversation

pappz
Copy link
Contributor

@pappz pappz commented Feb 10, 2023

Describe your changes

Add human readable log output. It print out the exact source code line information.

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

With this Logrus formatter you can navigate easier in the source code, based on log entries
Instead of just the 2. level directory now print out the full path
@pappz pappz marked this pull request as draft February 10, 2023 11:46
With this function you can set this logger for
newly created logger instances also
@pappz pappz marked this pull request as ready for review February 20, 2023 10:21
@pappz pappz requested a review from mlsmaycon February 20, 2023 10:52
pascal-fischer
pascal-fischer previously approved these changes Feb 21, 2023
In edge case can be issue if somebody set invalid
log level. In this case try to avoid a nil
pointer exception.
mlsmaycon
mlsmaycon previously approved these changes Feb 21, 2023
@mlsmaycon mlsmaycon self-requested a review February 21, 2023 15:31
@pascal-fischer
Copy link
Contributor

Will write a small test for Format and parseSrc functions.

@CLAassistant
Copy link

CLAassistant commented Feb 22, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ pascal-fischer
✅ pappz
❌ Pascal Fischer


Pascal Fischer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

formatter/formatter_test.go Outdated Show resolved Hide resolved
formatter/hook_test.go Outdated Show resolved Hide resolved
@braginini braginini merged commit 9f951c8 into main Feb 27, 2023
@braginini braginini deleted the log-formatter branch February 27, 2023 11:20
pappz added a commit that referenced this pull request Feb 27, 2023
Add human-readable log output. It prints out the exact source code line information.
pulsastrix pushed a commit to pulsastrix/netbird that referenced this pull request Dec 24, 2023
Add human-readable log output. It prints out the exact source code line information.
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.

5 participants