Skip to content

Commit

Permalink
memory dumps
Browse files Browse the repository at this point in the history
Signed-off-by: HTony03 <[email protected]>
  • Loading branch information
HTony03 authored and gitee-org committed Apr 4, 2024
1 parent bc9bbcb commit 6802d68
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions loggerjava/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def log(txt, type="i", pos="main", **overrides):
f.close()
if debugmodein:
return _formats.format(timelog, pos, level, txt)
del detailtime, inconsole, debugmodein
del detailtime, inconsole, debugmodein, timelog, overridename, data


def debug(txt, pos="main", **overrides):
Expand Down Expand Up @@ -203,7 +203,6 @@ def config(**kwargs):
tmpf = open(name + fileextension, mode="w", encoding=configname)
tmpf.close()
file_encoding = configname
del tmpf
if absolutepath:
f = open(route, mode="w", encoding=file_encoding)
else:
Expand Down Expand Up @@ -285,7 +284,7 @@ def exportconfig():
export current config
use loadconfig(config) to load this exported config
returning as a lib
:return:
:return: a dictonary contains configs
"""
i = {"name": name, "fileextension": fileextension, "absolutepath": absolutepath,
"route": route, "showdetailedtime": showdetailedtime, "showinconsole": showinconsole,
Expand All @@ -296,7 +295,7 @@ def exportconfig():
def loadconfig(inputconfig):
"""
:param inputconfig: the config lib exported from exportconfig()
:return:
:return: nothing
"""
global name, showdetailedtime, showinconsole, absolutepath, fileextension, file_encoding, route, fatalclose

Expand All @@ -317,7 +316,6 @@ def loadconfig(inputconfig):
tmpf = open(name + fileextension, mode="w", encoding=inputconfig["file_encoding"])
tmpf.close()
file_encoding = inputconfig["file_encoding"]
del tmpf
except LookupError:
warn("wrong file encoding config.this config is set to default", pos="main_loggerjava", showinconsole=True)
file_encoding = "utf-8"
Expand Down

0 comments on commit 6802d68

Please sign in to comment.