Fix logger memory exhaustion

Signed-off-by: Sebastiano Mariani <[email protected]>
This commit is contained in:
Sebastiano Mariani
2022-05-25 09:49:12 -07:00
parent fc9898af19
commit 600e7ada22
+2 -1
View File
@@ -7,6 +7,7 @@ import copy
import logging
import os
import re
import weakref
from typing import Optional, TextIO
@@ -38,7 +39,7 @@ class QlBaseFormatter(logging.Formatter):
def __init__(self, ql, *args, **kwargs):
super().__init__(*args, **kwargs)
self.ql = ql
self.ql = weakref.ref(ql)
def get_level_tag(self, level: str) -> str:
return self.__level_tag[level]