Skip to content

[Enhancement]- Fix log pollution#585

Merged
shubham-cmyk merged 4 commits intoOT-CONTAINER-KIT:masterfrom
drivebyer:log-pollution
Aug 27, 2023
Merged

[Enhancement]- Fix log pollution#585
shubham-cmyk merged 4 commits intoOT-CONTAINER-KIT:masterfrom
drivebyer:log-pollution

Conversation

@drivebyer
Copy link
Copy Markdown
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

Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
@drivebyer drivebyer changed the title [Enhancement] Log pollution [Enhancement]: Log pollution Aug 19, 2023
@shubham-cmyk
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

drivebyer and others added 2 commits August 20, 2023 22:59
…dd flag `zap-log-level`

Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
@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
Copy Markdown
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 <wuyangmuc@gmail.com>

* Level down some logger

Signed-off-by: drivebyer <wuyangmuc@gmail.com>

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

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* Level up every info, not logger

Signed-off-by: drivebyer <wuyangmuc@gmail.com>

---------

Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
shubham-cmyk added a commit that referenced this pull request Aug 30, 2023
* Add : v1beta2 from the current version

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : kubebuilder storage tag

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fix : PROJECT

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* getRedisReplicationMasterIP according to v1beta2

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* update : crds

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fix: /config/samples/

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* apis redis rediscluster redisreplication, sentinel

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add: rbac tags in rbac.go

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : scaffhold webhook and conversion files

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add and Fix : common.go for common fields

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : redis_conversion.go

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fix: minor bugs in redis conversion

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : Redis cluster conversion

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Fix : bugs for the redis cluster conversion

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : redisreplication conversion

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fix : redis standlone

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : sentinel conversion

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* Add : deepcopy

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

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

Signed-off-by: drivebyer <wuyangmuc@gmail.com>

* Add redis replication yaml example (#587)

Signed-off-by: drivebyer <yang.wu@daocloud.io>

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

* Write the docs for the restore and backup

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* add Prerequisites

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* typo

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

---------

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

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

* Add param to set operator log verbosity

Signed-off-by: drivebyer <wuyangmuc@gmail.com>

* Level down some logger

Signed-off-by: drivebyer <wuyangmuc@gmail.com>

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

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* Level up every info, not logger

Signed-off-by: drivebyer <wuyangmuc@gmail.com>

---------

Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <yang.wu@daocloud.io>

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

* Support redis sentinel pdb

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* Adjust example minAvailable

Signed-off-by: drivebyer <yang.wu@daocloud.io>

---------

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* Fix image path (#591)

Signed-off-by: Wilson Wu <iwilsonwu@gmail.com>

* Fix: bugs sentinel

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* fix : pretty

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* convert i to index

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

* remove index

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>

---------

Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: Wilson Wu <iwilsonwu@gmail.com>
Co-authored-by: Yang Wu <wuyangmuc@gmail.com>
Co-authored-by: Yang Wu <yang.wu@daocloud.io>
Co-authored-by: Wilson Wu <iwilsonwu@gmail.com>
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