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

DUPLO-17985: Updated logger to not print Log Level #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ddiaz-duplo
Copy link
Contributor

@ddiaz-duplo ddiaz-duplo commented Oct 9, 2024

Describe Changes

Updated logger to not print Log Level as it was getting annoying for users to see:

WARNING foo foo
WARNING ----
WARNING 
WARNING bar bar 
WARNING .

Link to Issues

PR Review Checklist

  • Thoroughly reviewed on local machine.
  • Have you added any tests
  • Make sure to note changes in Changelog

Testing

Before Fix
image

After Fix
image

@zafarabbas
Copy link

@duploctl
Copy link
Contributor

duploctl bot commented Oct 9, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2198 442 20% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/duplocloud/client.py 47% 🟢
TOTAL 47% 🟢

updated for commit: 5f129c7 by action🐍

@ddiaz-duplo ddiaz-duplo requested a review from kferrone October 9, 2024 00:04
@@ -316,7 +316,7 @@ def logger_for(self, name: str=None) -> logging.Logger:
logger = logging.getLogger(name)
lvl = logging.getLevelName(self.loglevel)
logger.setLevel(lvl)
formatter = logging.Formatter("%(levelname)s %(message)s")
formatter = logging.Formatter("%(message)s")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pretty sure this will affect all of the logs, not just the pod logs. I would prefer having a seperate logger for the pod logs. Then a logger for normal logs.

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