Skip to content

Instantly share code, notes, and snippets.

@briggleman
Created June 19, 2019 19:58
Show Gist options
  • Save briggleman/13325fc4ec0a26e87ee1222af48ec532 to your computer and use it in GitHub Desktop.
Save briggleman/13325fc4ec0a26e87ee1222af48ec532 to your computer and use it in GitHub Desktop.
Python Logging Filter
# logging filter, adds uuid to log message
class ClientUUID(logging.Filter):
@lru_cache(maxsize=1)
def filter(self, record):
record.uuid = UUID
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment