def __init__(self, label = ""):
# Avoid importing this at module scope in order
# to co-habit with chroma_settings()
from django.db import connection
self.connection = connection
self.label = label
self.logger.disabled = not self.enabled
if self.enabled and not len(self.logger.handlers):
self.logger.setLevel(logging.DEBUG)
self.logger.addHandler(logging.FileHandler('dbperf.log'))
评论列表
文章目录