mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
Fix logger memory exhaustion
Signed-off-by: Sebastiano Mariani <[email protected]>
This commit is contained in:
+2
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user