|
|
@ -48,11 +48,11 @@ class _ExportLogger: |
|
|
|
|
|
|
|
|
|
|
|
def msg(self, *args, **kwargs): |
|
|
|
def msg(self, *args, **kwargs): |
|
|
|
assert args |
|
|
|
assert args |
|
|
|
if self._file is not None: |
|
|
|
|
|
|
|
indent = kwargs.get("indent", 0) |
|
|
|
indent = kwargs.get("indent", 0) |
|
|
|
msg = "{}{}".format(" " * indent, args[0]) |
|
|
|
msg = "{}{}".format(" " * indent, args[0]) |
|
|
|
if len(args) > 1: |
|
|
|
if len(args) > 1: |
|
|
|
msg = msg.format(*args[1:], **kwargs) |
|
|
|
msg = msg.format(*args[1:], **kwargs) |
|
|
|
|
|
|
|
if self._file is not None: |
|
|
|
self._file.writelines((msg, "\n")) |
|
|
|
self._file.writelines((msg, "\n")) |
|
|
|
if self._print_logs: |
|
|
|
if self._print_logs: |
|
|
|
print(msg) |
|
|
|
print(msg) |
|
|
@ -277,7 +277,7 @@ class ExportProgressLogger(_ExportLogger): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ExportVerboseLogger(_ExportLogger): |
|
|
|
class ExportVerboseLogger(_ExportLogger): |
|
|
|
def __init__(self, age_path): |
|
|
|
def __init__(self, age_path=None): |
|
|
|
super().__init__(True, age_path) |
|
|
|
super().__init__(True, age_path) |
|
|
|
self.progress_range = 0 |
|
|
|
self.progress_range = 0 |
|
|
|
self.progress_value = 0 |
|
|
|
self.progress_value = 0 |
|
|
|