Skip to content

Add debug logging to ModelicaSystem sendExpression - #242

Merged
lochel merged 1 commit into
OpenModelica:masterfrom
ondras12345:logging
Apr 6, 2025
Merged

Add debug logging to ModelicaSystem sendExpression#242
lochel merged 1 commit into
OpenModelica:masterfrom
ondras12345:logging

Conversation

@ondras12345

Copy link
Copy Markdown
Contributor

I have just spent several hours debugging why ModelicaSystem() cannot load my custom package.
It turns out that it does not support relative paths, because it cd()s to a tmp directory.
However, that is really hard to see without appropriate logging.

This PR allows the user to see exactly what's happening by enabling debug logging:

import logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("OMPython").setLevel(logging.DEBUG)
@CLAassistant

CLAassistant commented Apr 5, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lochel lochel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good 👍

@lochel
lochel merged commit 0c80af6 into OpenModelica:master Apr 6, 2025
@ondras12345
ondras12345 deleted the logging branch April 6, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants