Simon Strandgaard
commited on
Commit
·
554a24e
1
Parent(s):
9b6304b
enable logging
Browse files
src/plan/app_text2plan.py
CHANGED
@@ -11,6 +11,7 @@ import subprocess
|
|
11 |
import time
|
12 |
import sys
|
13 |
import threading
|
|
|
14 |
from dataclasses import dataclass
|
15 |
from math import ceil
|
16 |
from src.llm_factory import get_available_llms
|
@@ -486,6 +487,14 @@ with gr.Blocks(title="PlanExe") as demo_text2plan:
|
|
486 |
)
|
487 |
|
488 |
def run_app_text2plan():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
if CONFIG.enable_purge_old_runs:
|
490 |
start_purge_scheduler(run_dir=os.path.abspath(RUN_DIR), purge_interval_seconds=60*60, prefix=RUN_ID_PREFIX)
|
491 |
|
|
|
11 |
import time
|
12 |
import sys
|
13 |
import threading
|
14 |
+
import logging
|
15 |
from dataclasses import dataclass
|
16 |
from math import ceil
|
17 |
from src.llm_factory import get_available_llms
|
|
|
487 |
)
|
488 |
|
489 |
def run_app_text2plan():
|
490 |
+
logging.basicConfig(
|
491 |
+
level=logging.INFO,
|
492 |
+
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
493 |
+
handlers=[
|
494 |
+
logging.StreamHandler()
|
495 |
+
]
|
496 |
+
)
|
497 |
+
|
498 |
if CONFIG.enable_purge_old_runs:
|
499 |
start_purge_scheduler(run_dir=os.path.abspath(RUN_DIR), purge_interval_seconds=60*60, prefix=RUN_ID_PREFIX)
|
500 |
|