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 support for log rotation #527

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

shahar-klein
Copy link
Contributor

When using debug level the log files tends to fill up quickly.
Add support for log rotation using lumberjack, simple and easy to use
log rotation module.

Signed-off-by: Shahar Klein sklein@nvidia.com

Copy link
Member

@s1061123 s1061123 left a comment

Choose a reason for hiding this comment

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

First, thank you so much for your pull request!
Almost OK to me, but let me add minor comment as following:

  1. Currently multus keeps vendor directory to build multus without go modules. Could you do go mod vendor to update vendor package?
  2. Could you please change loggingFp in logging/logging_test.go file?

@shahar-klein
Copy link
Contributor Author

First, thank you so much for your pull request!
Almost OK to me, but let me add minor comment as following:

Thank you for your comments - I fixed and pushed

@coveralls
Copy link

coveralls commented Jun 16, 2020

Pull Request Test Coverage Report for Build 137706987

  • 8 of 12 (66.67%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 71.544%

Changes Missing Coverage Covered Lines Changed/Added Lines %
logging/logging.go 8 12 66.67%
Files with Coverage Reduction New Missed Lines %
logging/logging.go 1 47.56%
Totals Coverage Status
Change from base Build 130155749: 0.02%
Covered Lines: 1066
Relevant Lines: 1490

💛 - Coveralls

MaxAge: 5, // days
Compress: true,
}
if w == nil {
fmt.Fprintf(os.Stderr, "multus logging: cannot open %s", filename)

Choose a reason for hiding this comment

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

@shahar-klein why would w be nil here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comment - fixed.

When using debug level the log files tends to fill up quickly.
Add support for log rotation using lumberjack, simple and easy to use
log rotation module.

Signed-off-by: Shahar Klein <sklein@nvidia.com>
Copy link
Member

@dougbtv dougbtv left a comment

Choose a reason for hiding this comment

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

LGTM!

@girishmg
Copy link

/lgtm as well

@s1061123
Copy link
Member

LGTM, too! thank you for your help! Merged.

@s1061123 s1061123 merged commit ecb7933 into k8snetworkplumbingwg:master Jun 17, 2020
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.

None yet

5 participants