Skip to content

Instantly share code, notes, and snippets.

import inspect
import logging
import re
# from https://github.com/baniuyao/Python-CLog/blob/master/CLog.py
class LogRecordWithStack(logging.LogRecord):
def __init__(self, *args, **kargs):
super(LogRecordWithStack, self).__init__(*args, **kargs)
self.chain = self.get_meta_data()