-
Notifications
You must be signed in to change notification settings - Fork 6
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
Incoherent logger output streams #125
Comments
FWIW I have a crude patch of substituting the seal5.logger::get_logger() as above everywhere, which seems to work |
@thomasgoodfellow I can also live with a single unnamed logger. We should check the fmtstring though, and consider printing the file names to identify the source of the logging statements. Ideally this would be available in the logging file on disk but not n the stdout as it could get way to verbose… |
Feel free to provide/submit the patch, I am happy to apply/merge it! |
I am not sure what will happen if we just I think I need to have another look at this to figure out which approach works best for both python- and subprocess-based passes. |
Agreed; looking at the subprocess.Popen() handling it certainly seems that stderr should have been captured. I'll take another look |
The default seal5 logger (logging.py) logs both to stdout and .seal5/logs/seal5.log, however many of the daughter modules log directly to the Python default of stderr (because they get the Python logger directly):
This means that their output is visible in the terminal but not captured in the log file.
As a user the distinction between different seal5 components is rather arbitrary, e.g. that the LLVM file compilations are in stdout + file but the details of transformations are only in stderr, and will also be subject to change (more daughter processes for better parallelism, etc). I’d prefer that it was coherent, i.e. in a single stream and strongly chronological (redirecting stderr to stdout and redirecting stdout to a file would usually achieve this, however the pipe redirection used when launching the daughter processes prevents it).
Since seal5 already has an explicit log file the easiest option could be simply using that:
That does have the mild drawback of losing the specificity of the “detect_inouts” entity name (not that this is usually visible?), but maybe that could be supported as an optional parameter to seal5.get_logger()
The text was updated successfully, but these errors were encountered: