Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No FATAL log messages #13

Open
eisDNV opened this issue Nov 20, 2024 · 2 comments
Open

No FATAL log messages #13

eisDNV opened this issue Nov 20, 2024 · 2 comments

Comments

@eisDNV
Copy link

eisDNV commented Nov 20, 2024

In libcosim(py) the log level can be set using e.g. log_output_level( CosimLogLevel.ERROR). When the level is set to CosimLogLevel.FATAL, nothing is reported any more (in my model I added a logStatusFatal message, but that and all lesser level messages are not reported).
The other log levels are reported, but there are three confusing issues:

  1. the log levels do not directly correspond to the suggested FMI2 log levels (which are only suggestions)
  2. FMI2 log levels 'warning' and 'discard' seem to be switched: CosimLogLevel.INFO leaves out discard, but includes warning, even if discard should be a higher level message according to FMI2
  3. There dies not seem to be a difference between CosimLogLevel.INFO and CosimLogLevel.WARNING (same logStatus* reported)

Can these be better aligned with FMI2 suggested log levels?

@msteinsto
Copy link
Contributor

Need to do some testing to know for sure, but this appears to be an upstream issue. libcosimpy is essentially a direct wrapper of libcosimc and passes any received value from cosim_log_set_output_level. Logic in libcosimpy maps the received integer to a python enum which seems to align with current libcosimc enum definition that has not been modified in a while. I find it more likely that the issue is related to libcosim or libcosimc unless the received values from libcosimc are correct. Definitely an issue that should be looked into, but probably not libcosimpy related

@eisDNV
Copy link
Author

eisDNV commented Nov 20, 2024

Yes. I expected that much. Since I use libcosimpy I logged the problem here and then we can push it to libcosim if that is most relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants