crowdsec
crowdsec copied to clipboard
Add possibility to configure log format #799
https://github.com/crowdsecurity/crowdsec/issues/799
logrus which is used as logging backend supports json formatter.
This change makes it possible to configure either text or json output.
@victoredvardsson: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
-
/kind feature
-
/kind enhancement
-
/kind fix
-
/kind chore
-
/kind dependencies
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
@victoredvardsson: There are no area labels on this PR. You can add as many areas as you see fit.
-
/area agent
-
/area local-api
-
/area cscli
-
/area appsec
-
/area security
-
/area configuration
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
/kind feature
/area configuration
Codecov Report
Attention: Patch coverage is 70.73171%
with 12 lines
in your changes missing coverage. Please review.
Project coverage is 38.85%. Comparing base (
e3c6a5b
) to head (5cfc3c5
). Report is 74 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
cmd/crowdsec/fatalhook.go | 61.11% | 7 Missing :warning: |
pkg/types/utils.go | 68.75% | 5 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #2941 +/- ##
===========================================
+ Coverage 27.54% 38.85% +11.30%
===========================================
Files 398 399 +1
Lines 57920 57952 +32
===========================================
+ Hits 15954 22515 +6561
+ Misses 40028 32951 -7077
- Partials 1938 2486 +548
Flag | Coverage Δ | |
---|---|---|
bats | 30.19% <93.54%> (?) |
|
unit-linux | 35.07% <32.25%> (+0.01%) |
:arrow_up: |
unit-windows | 25.57% <2.43%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Looks like all checks went through now 👍
I still need to add a formatter for stderr when the rest of the messages goes to a file. We don't want fatal errors to be formatted in json for this case. Will do asap and merge for 1.6.2
merge is postponed to 1.6.3 since I'd like to correctly bubble up errors from goroutines and 1.6.2 is too soon
merge is postponed to 1.6.3 since I'd like to correctly bubble up errors from goroutines and 1.6.2 is too soon
We keeping 1.6.3
or moving to 1.6.4
?
Next one, I'd rather remove the remaining os.Exit and log.Fatal before implementing this