Skip to content

Adjust Log Level Based on Debug Flags#85

Merged
ChristianAtDell merged 2 commits into
mainfrom
pub/add-debug-flag-support
Mar 7, 2025
Merged

Adjust Log Level Based on Debug Flags#85
ChristianAtDell merged 2 commits into
mainfrom
pub/add-debug-flag-support

Conversation

@ChristianAtDell

Copy link
Copy Markdown
Contributor

Description

Debug flag now appropriately sets log level. Show HTTP flag also sets log level to 'debug' as needed.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1762

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

I have manually built an image of csi-unity using the updated gounity and verified that the environment variables being set in the driver container change the logs that are printed, displaying debug logs when GOUNITY_DEBUG or GOUNITY_SHOWHTTP are set to true and displaying appropriate loglines.

@github-actions

github-actions Bot commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/gounity 90.07% (ø)
github.com/dell/gounity/util 94.37% (+0.16%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/gounity/unityclient.go 83.50% (ø) 103 86 17
github.com/dell/gounity/util/util.go 94.37% (+0.16%) 71 (+2) 67 (+2) 4 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/gounity/util/util_test.go

@ChristianAtDell ChristianAtDell merged commit 2422f37 into main Mar 7, 2025
@ChristianAtDell ChristianAtDell deleted the pub/add-debug-flag-support branch March 7, 2025 14:46
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.

3 participants