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

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?
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 -
@Ayush Kumar have you seen this issue before?
0 -
@Naveen Kumar Begari can you please share the import modules on the top of your script? And which Mechanical version are you working with?
0 -
Hi @Ayush Kumar ,
For above code I used below modules:from ansys.mechanical.core import App
import loggingAnd now im checking with - from ansys.mechanical.core.embedding.logger import Logger,Configuration
0 -
@AKD-Scripting-Team , if you need additional information or data, let me know.
0 -
So as to avoid double work for all, this issue has been reported as a bug here: https://github.com/ansys/pymechanical/issues/1116
0 -
@Pernelle Marone-Hitz said:
So as to avoid double work for all, this issue has been reported as a bug here: https://github.com/ansys/pymechanical/issues/1116@Pernelle Marone-Hitz I have raised this issue on GitHub and am waiting for confirmation of the bug. However, I have yet to receive a response from the developer team.
Thanks!!
0 -
@James Derrick can i get any solution on this please.?
Is logger module can be integrated full fledged for PyAnsys Modules.?
0 -
@Naveen Kumar Begari , @James Derrick is not involved in this topic. The issue has been reported as a bug in Github, the development team is currently looking at it, there is nothing else we can do on the forum side.
0