File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import logging
66from helpermodules import logger
77from helpermodules .utils import thread_handler
8+ import threading
9+ import sys
810
911# als erstes logging initialisieren, damit auch ImportError geloggt werden
1012logger .setup_logging ()
@@ -73,6 +75,17 @@ def handler_with_control_interval():
7375
7476 log .info ("# ***Start*** " )
7577 log .debug (f"Threads: { enumerate ()} " )
78+ for thread in threading .enumerate ():
79+ logging .debug (f"Thread Name: { thread .name } " )
80+ if hasattr (thread , "ident" ):
81+ thread_id = thread .ident
82+ for tid , frame in sys ._current_frames ().items ():
83+ if tid == thread_id :
84+ logging .debug (f" File: { frame .f_code .co_filename } , Line: { frame .f_lineno } , Function: { frame .f_code .co_name } " )
85+ stack_trace = traceback .format_stack (frame )
86+ logging .debug (" Stack Trace:" )
87+ for line in stack_trace :
88+ logging .debug (line .strip ())
7689 Pub ().pub ("openWB/set/system/time" , timecheck .create_timestamp ())
7790 handler_with_control_interval ()
7891 logger .write_logs_to_file ("main" )
You can’t perform that action at this time.
0 commit comments