Created
September 2, 2021 18:45
-
-
Save juan-ignacio-sanchez/6bd02afc383c79fbe4e7aeb2397d3699 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import queue | |
| SLACK_QUEUE = queue.Queue() | |
| LOGGING = { | |
| ... | |
| 'formatters': {...}, | |
| 'handlers': { | |
| ... | |
| 'slack': { | |
| 'class': 'logging.handlers.QueueHandler', # Set QueueHandler as the new handler. | |
| 'level': 'DEBUG', | |
| 'queue': SLACK_QUEUE, # Set the queue used to inter-thread communication. | |
| } | |
| }, | |
| 'loggers': {...}, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment