Fix duplicate log print issue
This commit is contained in:
parent
dad375dec8
commit
e3e3d3b914
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
llm_debug.log
|
||||
config.py
|
||||
config.py.bak
|
||||
simple_bubble_dedup.json
|
||||
__pycache__/
|
||||
debug_screenshots/
|
||||
chat_logs/
|
||||
|
||||
5
Setup.py
5
Setup.py
@ -69,6 +69,7 @@ keep_monitoring_flag.set()
|
||||
# logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
# Setup logger instance. This can be configured further if needed.
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.propagate = False
|
||||
if not logger.handlers: # Avoid adding multiple handlers if script is reloaded
|
||||
handler = logging.StreamHandler()
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
@ -2783,8 +2784,8 @@ else: # HAS_SOCKETIO is False
|
||||
# ===============================================================
|
||||
if __name__ == "__main__":
|
||||
# Setup main logger for the application if not already done
|
||||
if not logging.getLogger().handlers: # Check root logger
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
#if not logging.getLogger().handlers: # Check root logger
|
||||
# logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
|
||||
app = WolfChatSetup()
|
||||
app.protocol("WM_DELETE_WINDOW", app.on_closing) # Handle window close button
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user