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

Maintenance: Update logger to use timestamps #81

Closed
quixoticmonk opened this issue Mar 17, 2023 · 0 comments · Fixed by #82
Closed

Maintenance: Update logger to use timestamps #81

quixoticmonk opened this issue Mar 17, 2023 · 0 comments · Fixed by #82
Assignees

Comments

@quixoticmonk
Copy link
Contributor

quixoticmonk commented Mar 17, 2023

Summary

Add timestamp to the logging output across the eksupgrade codebase.

Why is this needed?

This would help in debugging issues related to timing like the initial delay in cluster status changing from ACTIVE to UPDATING to make decisions when to update nodegroups and addons.

Which area does this relate to?

Other

Solution

Create a logging utility which has a formatter attached to it.

logger = logging.getLogger(__name__)
handler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
@quixoticmonk quixoticmonk self-assigned this Mar 18, 2023
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 a pull request may close this issue.

1 participant