-
Notifications
You must be signed in to change notification settings - Fork 6
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: allow add custom logger #19
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
==========================================
+ Coverage 82.14% 85.14% +3.00%
==========================================
Files 6 10 +4
Lines 168 303 +135
==========================================
+ Hits 138 258 +120
- Misses 22 31 +9
- Partials 8 14 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
820c716
to
c6c798d
Compare
@ttys3 Thanks, but for now I'll hold this pr for a while. Because I decide to rename this repo, since it's not logr specific anymore :) |
d0e7f33
to
ebec426
Compare
… to have custom logger checker configs
ebec426
to
5e9985c
Compare
1035c27
to
e2801bc
Compare
921f580
to
5948263
Compare
I have some ideas, I'll apply some changes to your PR |
OK. the main idea purpose is:
|
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
@ttys3 I've pushed my changes, PTAL |
Signed-off-by: Timon Wong <[email protected]>
I should rename pattern to rules |
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
Thanks! |
I have some idea on the exported Config struct. |
I'm try to make a PR to show the idea when I have time |
@ttys3 I think the clean way to do that is re-implement Or we can doing the parse during "run", though not very clean. |
feat: allow add custom logger, also allow others like golangci-lint to have custom logger checker configs
we wrap zap logger in most cases, so I hope this linter can also allow user to check zap, logr or klog based wrapper or anyother logger.
update:
refactored to using a config file to define custom loggers.
the config file format is
yaml
sample config file: