-
Notifications
You must be signed in to change notification settings - Fork 0
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
Python target does not provide user-facing log functions #28
Comments
This ticket should probably be transfered to the reactor-c-py repo? |
You are right that this issue might squarely fall into the First, issues related to the Python target can get scattered around. This is not a big deal but it makes it harder to keep track of them all. Any thoughts on how we could increase the visibility of the issues in the smaller repos? Maybe we can pin an issue that links to the issue pages of the satellite repos? |
I'm not sure I understand why moving issues like these makes it harder to keep track of them. We've been doing that for It is always possible to reference an issue in another repo, like so: lf-lang/reactor-c#2 Either way, it was just a suggestion. If you want to keep it here, that's fine too. |
That's a good point. The biggest concern for me is visibility. Thoughts on this?
|
I personally don't really perceive a visibility issue. It hasn't been a problem for any of the other runtime repos that I know of... |
To be honest, the issues in reactor-ts have remained mostly hidden to me until now that I have checked it after a year and a half... |
But why would you be checking the issues if you're not actively contributing code? If you push code to that repo, you see the issues. If you don't push code, you don't see the issues. That's sounds perfectly reasonable to me. |
I think the big picture goal should be to solicit new contributors that can fix issues, not to compartmentalize development into obscure places. |
I would like to add that this feature is already implemented in a very portable, flexible and adjustable way in the widely used |
Thanks for this suggestion. I think a nice-to-have feature that the C log functions offer (which this module doesn't by default) is that if the program is federated, they prepend a The |
Yes.
Indeed, this is how you would achieve this. You can easily insert a line that configures logging in a central place in the generated Python code. Also adding timestamps (physical and/or logical) is possible. In Mocasin, we additionally use a customized formatter to automatically print the current logical timestamp of the event for each message produced during simulation. |
The C target has a few useful user-facing APIs such as
DEBUG_PRINT()
anderror_print()
that will allow the user to add thread-safe print statements in the body of reactions. The output (or lack thereof) of these APIs can then be controlled using thelogging
target specification.This could be a very useful feature in the Python target as well.
To-Do
The text was updated successfully, but these errors were encountered: