Why is the logger being deactivated when the APDL solver is triggered?

Naveen Kumar Begari
Member Posts: 77
**
in Structures
Hi Team,
I was working with the logging module, and I've noticed that when the analysis is running, the logger disconnects. Once the solving process is complete, it automatically reconnects.
Is there any solution to handle this issue?
0
Comments
-
Hi @Naveen Kumar Begari Could you please provide a simple code example to demonstrate this issue?
0 -
Hello @Landon Mitchell Kanner , I have sent the script internally
0 -
async def solve_structural_analysis(): try: logger.debug("Solving Structural Analysis...") asyncio.to_thread(solution.Solve(True)) logger.debug("Solved Structural Analysis...") except Exception as e: logger.error(f"An error occurred while solving the analysis: {e}") # Running the async function asyncio.run(solve_structural_analysis())
Here is the script, "The logger shows nothing during the analysis, and only starts logging again once the solution process is complete.
@James Derrick It would be very helpful for your guidance
Thanks
Naveen Kumar0 -
Please consider this script: @AKD-Scripting-Team
async def solve_structural_analysis(): try: logger.debug("Solving Structural Analysis...") asyncio.to_thread(solution.Solve(True)) logger.debug("Solved Structural Analysis...") except Exception as e: logger.error(f"An error occurred while solving the analysis: {e}") #Running the async function asyncio.run(solve_structural_analysis())
0