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

Add possibility to configure log format #799 #2941

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

victoredvardsson
Copy link

@victoredvardsson victoredvardsson commented Apr 14, 2024

#799

logrus which is used as logging backend supports json formatter.

This change makes it possible to configure either text or json output.

Copy link

@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.

Copy link

@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.

@victoredvardsson
Copy link
Author

/kind feature

@victoredvardsson
Copy link
Author

/area configuration

@victoredvardsson victoredvardsson marked this pull request as draft April 15, 2024 07:02
@victoredvardsson victoredvardsson marked this pull request as ready for review April 15, 2024 08:10
pkg/types/utils.go Outdated Show resolved Hide resolved
pkg/types/utils.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 70.73171% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 38.85%. Comparing base (e3c6a5b) to head (5cfc3c5).
Report is 8 commits behind head on master.

Files Patch % Lines
cmd/crowdsec/fatalhook.go 61.11% 7 Missing ⚠️
pkg/types/utils.go 68.75% 5 Missing ⚠️
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%) ⬆️
unit-windows 25.57% <2.43%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@victoredvardsson
Copy link
Author

Looks like all checks went through now 👍

@mmetc
Copy link
Contributor

mmetc commented May 7, 2024

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

@mmetc mmetc modified the milestones: 1.6.2, 1.6.3 May 16, 2024
@mmetc
Copy link
Contributor

mmetc commented May 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants