We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c632659 commit 7b8025dCopy full SHA for 7b8025d
graphgen/generate.py
@@ -65,7 +65,7 @@ def main():
65
"GraphGen with unique ID %s logging to %s",
66
unique_id,
67
os.path.join(
68
- working_dir, "logs", f"graphgen_{output_data_type}_{unique_id}.log"
+ working_dir, "logs", f"{unique_id}_graphgen_{output_data_type}.log"
69
),
70
)
71
graphgen/utils/log.py
@@ -9,10 +9,19 @@
9
def set_logger(
10
log_file: str,
11
log_level: int = logging.INFO,
12
+ *,
13
if_stream: bool = True,
14
max_bytes: int = 50 * 1024 * 1024, # 50 MB
15
backup_count: int = 5,
16
+ force: bool = False,
17
):
18
+
19
+ if logger.hasHandlers() and not force:
20
+ return
21
22
+ if force:
23
+ logger.handlers.clear()
24
25
logger.setLevel(log_level)
26
logger.propagate = False
27
0 commit comments