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]- Fix log pollution #585

Merged
merged 4 commits into from
Aug 27, 2023

Conversation

drivebyer
Copy link
Collaborator

@drivebyer drivebyer commented Aug 19, 2023

Description

Fixes #430

Add log verbosity param && level down some logger.
Right now we are pursuing level 1 only for higher complexity but level 2..10 could be used later depends on the complexity of logs.

To control the verbosity of logs you can pass args --zap-log-level=1 as described here

Type of change

Enhancement: Since the stdout was thrown will lots of info logs before but now you can control with the verbose level at 1.

Checklist

  • Testing has been performed
  • No functionality is broken
  • Documentation updated

@drivebyer drivebyer changed the title [Enhancement] Log pollution [Enhancement]: Log pollution Aug 19, 2023
@shubham-cmyk
Copy link
Member

@drivebyer
If we change the level for the logger from here https://github.com/OT-CONTAINER-KIT/redis-operator/blob/master/k8sutils/redis.go#L431

It would be much simpler to handle

@drivebyer
Copy link
Collaborator Author

If we change the level for the logger from here https://github.com/OT-CONTAINER-KIT/redis-operator/blob/master/k8sutils/redis.go#L431

yes, I have already change the logger level from ZERO to ONE, along with many other loggers.

Copy link
Member

@shubham-cmyk shubham-cmyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also @drivebyer Changing log level won't just solve the problem you have to move many of the log that we were marking on the info to the debug

main.go Show resolved Hide resolved
drivebyer and others added 2 commits August 20, 2023 22:59
@drivebyer drivebyer changed the title [Enhancement]: Log pollution [Enhancement]- Support log pollution Aug 27, 2023
@shubham-cmyk shubham-cmyk changed the title [Enhancement]- Support log pollution [Enhancement]- Fix log pollution Aug 27, 2023
Copy link
Member

@shubham-cmyk shubham-cmyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drivebyer Great Work! Thanks a lot for PR

@shubham-cmyk shubham-cmyk merged commit caf446e into OT-CONTAINER-KIT:master Aug 27, 2023
@drivebyer drivebyer deleted the log-pollution branch August 27, 2023 04:25
shubham-cmyk pushed a commit to shubham-cmyk/redis-operator that referenced this pull request Aug 30, 2023
* Add param to set operator log verbosity

Signed-off-by: drivebyer <[email protected]>

* Level down some logger

Signed-off-by: drivebyer <[email protected]>

* Remove unnecessary flag, `opts.BindFlags(flag.CommandLine)` already add flag `zap-log-level`

Signed-off-by: drivebyer <[email protected]>

* Level up every info, not logger

Signed-off-by: drivebyer <[email protected]>

---------

Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
shubham-cmyk added a commit that referenced this pull request Aug 30, 2023
* Add : v1beta2 from the current version

Signed-off-by: Shubham Gupta <[email protected]>

* Add : kubebuilder storage tag

Signed-off-by: Shubham Gupta <[email protected]>

* fix : PROJECT

Signed-off-by: Shubham Gupta <[email protected]>

* getRedisReplicationMasterIP according to v1beta2

Signed-off-by: Shubham Gupta <[email protected]>

* update : crds

Signed-off-by: Shubham Gupta <[email protected]>

* fix: /config/samples/

Signed-off-by: Shubham Gupta <[email protected]>

* apis redis rediscluster redisreplication, sentinel

Signed-off-by: Shubham Gupta <[email protected]>

* Add: rbac tags in rbac.go

Signed-off-by: Shubham Gupta <[email protected]>

* Add : scaffhold webhook and conversion files

Signed-off-by: Shubham Gupta <[email protected]>

* Add and Fix : common.go for common fields

Signed-off-by: Shubham Gupta <[email protected]>

* Add : redis_conversion.go

Signed-off-by: Shubham Gupta <[email protected]>

* fix: minor bugs in redis conversion

Signed-off-by: Shubham Gupta <[email protected]>

* Add : Redis cluster conversion

Signed-off-by: Shubham Gupta <[email protected]>

* Fix : bugs for the redis cluster conversion

Signed-off-by: Shubham Gupta <[email protected]>

* Add : redisreplication conversion

Signed-off-by: Shubham Gupta <[email protected]>

* fix : redis standlone

Signed-off-by: Shubham Gupta <[email protected]>

* Add : sentinel conversion

Signed-off-by: Shubham Gupta <[email protected]>

* Add : deepcopy

Signed-off-by: Shubham Gupta <[email protected]>

* Auto recreate redis replication statefulset when update failed (#586)

Signed-off-by: drivebyer <[email protected]>

* Add redis replication yaml example (#587)

Signed-off-by: drivebyer <[email protected]>

* [Add] : Write the docs for the restore and backup (#588)

* Write the docs for the restore and backup

Signed-off-by: Shubham Gupta <[email protected]>

* add Prerequisites

Signed-off-by: Shubham Gupta <[email protected]>

* typo

Signed-off-by: Shubham Gupta <[email protected]>

---------

Signed-off-by: Shubham Gupta <[email protected]>

* [Enhancement]- Fix log pollution (#585)

* Add param to set operator log verbosity

Signed-off-by: drivebyer <[email protected]>

* Level down some logger

Signed-off-by: drivebyer <[email protected]>

* Remove unnecessary flag, `opts.BindFlags(flag.CommandLine)` already add flag `zap-log-level`

Signed-off-by: drivebyer <[email protected]>

* Level up every info, not logger

Signed-off-by: drivebyer <[email protected]>

---------

Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>

* [Add]- Support redis sentinel pdb (#589)

* Support redis sentinel pdb

Signed-off-by: drivebyer <[email protected]>

* Adjust example minAvailable

Signed-off-by: drivebyer <[email protected]>

---------

Signed-off-by: drivebyer <[email protected]>

* Fix image path (#591)

Signed-off-by: Wilson Wu <[email protected]>

* Fix: bugs sentinel

Signed-off-by: Shubham Gupta <[email protected]>

* fix : pretty

Signed-off-by: Shubham Gupta <[email protected]>

* convert i to index

Signed-off-by: Shubham Gupta <[email protected]>

* remove index

Signed-off-by: Shubham Gupta <[email protected]>

---------

Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: Wilson Wu <[email protected]>
Co-authored-by: Yang Wu <[email protected]>
Co-authored-by: Yang Wu <[email protected]>
Co-authored-by: Wilson Wu <[email protected]>
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.

Log pollution
2 participants