aboutsummaryrefslogtreecommitdiff
path: root/mlog.py
diff options
context:
space:
mode:
Diffstat (limited to 'mlog.py')
-rw-r--r--mlog.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mlog.py b/mlog.py
index 4685c51..2807c2b 100644
--- a/mlog.py
+++ b/mlog.py
@@ -27,6 +27,11 @@ def initialize(logdir):
log_dir = logdir
log_file = open(os.path.join(logdir, 'meson-log.txt'), 'w')
+def shutdown():
+ global log_file
+ if log_file is not None:
+ log_file.close()
+
class AnsiDecorator():
plain_code = "\033[0m"