Opened 6 years ago
Closed 6 years ago
#5039 closed defect (fixed)
How to supress "stdout" messages in terminal?
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | Run-time | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: | Lennart Ochel |
Description
Hi there,
Just wanted to ask if there is any simulation flag to turn off "stdout" messages (like the one copied below) in terminal (I am using Ubuntu 16.04 64 bit):
stdout | info | ... loading "weather" from "/home/...motab" stdout | info | ... loading "eff1" from "/home/....motab" stdout | info | ... loading "data" from "/home/.../...motab"
I know for example the "-lv=-LOG_SUCCESS" flag will turn off all the messages related to LOG_SUCCESS.
Thanks,
Ali
Change History (10)
comment:1 by , 6 years ago
Component: | *unknown* → OMEdit |
---|---|
Owner: | changed from | to
comment:2 by , 6 years ago
comment:4 by , 6 years ago
Thanks for the reply.
I did set the "verboseRead" Boolean to false, but it did not work. I also tried -lv=-LOG_STDOUT
, but apparently, there is no such an option in the "lv" flag.
Any other workaround that you can think of?
Cheers,
Al
comment:5 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Hm, yes, it does seem to be always on and there is no way to change that yet:
https://github.com/OpenModelica/OMCompiler/blob/master/SimulationRuntime/c/util/omc_error.c#L88
Lennart, is it possible to add a flag to disable the LOG_INFO?
comment:6 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | assigned → accepted |
I have a fix for this, will make a PR soon.
comment:7 by , 6 years ago
Cc: | added |
---|---|
Component: | OMEdit → Run-time |
Milestone: | Future → 1.13.0 |
I'm not sure if we should rename:
- stdout to LOG_STDOUT
- assert to LOG_ASSERT
maybe we could use -lv=-stdout and -lv=-assert
Lennart, what do you think?
It will be something like this for now:
adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OMTesting/ $ ./ModelicaTest.Tables.CombiTable1D.Test18.exe LOG_STDOUT | info | ... loading "longLine" from "c:\home\adrpo33\dev\OpenModelica\build\lib\omlibrary\Modelica 3.2.2\Resources\Data\Tables\test.txt" LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OMTesting/ $ ./ModelicaTest.Tables.CombiTable1D.Test18.exe -lv=-LOG_STDOUT LOG_SUCCESS | info | The initialization finished successfully without homotopy method. LOG_SUCCESS | info | The simulation finished successfully. adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OMTesting/ $ ./ModelicaTest.Tables.CombiTable1D.Test18.exe -lv=-LOG_STDOUT,-LOG_SUCCESS
comment:8 by , 6 years ago
The changes are in PR: https://github.com/OpenModelica/OMCompiler/pull/2573
comment:9 by , 6 years ago
@Ali: i guess you know that in the terminal you can redirect the stdout and stderr to a file via:
Model > log.txt 2>&1
but probably this is not something you want.
comment:10 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Functionality to disable stdout and assert streams is now available via -lv=-stdout
or -lv=-assert
.
These are displayed by Modelica tables.
Have a look at the code, you can disable the printout: