Skip to content

Conversation

@aminalaee
Copy link
Contributor

Closes #99

Adds the shutdown method.

WIP: The coverage tests will be added.

handlers = [logger.handlers for logger in root.manager.loggerDict.values()] + [
root.handlers
]
handlerList = list(itertools.chain(*handlers))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is probably a smarter way to get the list of handlers to flush/close. Any suggestions?

The standard logging uses a Weakref instance to hold refs but I guess that's not possible between C and Python types?

@aminalaee aminalaee marked this pull request as draft September 26, 2023 08:00
@aminalaee aminalaee changed the title Add shutdown method WIP: Add shutdown method Sep 29, 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 this pull request may close these issues.

No logging.shutdown() function

1 participant