Skip to content

Commit 5d9b182

Browse files
committed
[ModelicaSystem] do not print all output of OM command executed
1 parent 118931e commit 5d9b182

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OMPython/ModelicaSystem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import importlib
4545
import pathlib
4646
from dataclasses import dataclass
47+
import textwrap
4748
from typing import Optional
4849

4950
from OMPython.OMCSession import OMCSessionZMQ, OMCSessionException
@@ -337,7 +338,7 @@ def sendExpression(self, expr, parsed=True):
337338
except OMCSessionException as ex:
338339
raise ModelicaSystemError(f"Error executing {repr(expr)}") from ex
339340

340-
logger.debug(f"Result of executing {repr(expr)}: {repr(retval)}")
341+
logger.debug(f"Result of executing {repr(expr)}: {textwrap.shorten(repr(retval), width=100)}")
341342

342343
return retval
343344

0 commit comments

Comments
 (0)