-
Notifications
You must be signed in to change notification settings - Fork 70
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
Log output of commands to logfile #520
Conversation
Can one of the admins verify this patch? |
22cfb26
to
821c49b
Compare
Output of commands is mixing with logging info in the file which makes it difficult to read. example:
|
@jmikovic That is a problem with the way how the output of external command is handled in I'm not sure whether it's worth it to dig deep into the internals of the |
Taking my last comment back, it looks like argument |
Messed up lines in logfile are now fixed. However now I wonder whether it makes sense to use |
it would be best if there isn't logging prefix for command output, it will make it much easier to read |
You mean even for the logfile? I don't think that's a good idea, every line in the logfile should have a logging prefix to be auditable. |
Yes, it's fine if the logging prefix is at the beginning of command output but having it on each line of output seems too much to me |
I also think that having every line in the log file prefixed is not necessary. Right now, some actors log multiline strings and I see no problem with it, e.g.
|
I'm still not convinced that not having a logging prefix for each line is a good idea. When prefix is not included in every line, this could lead to a situation, when there are 2 loggers that write to a logfile at the same time, and you are not able to distinguish what line belongs to what process when the prefix is missing. @shaded-enmity @pirat89 what do you think? |
@vojtechsokol why it should be problem? The message is printed through our API - so there should not be any problem with logging. Additionally, there is not parrallel processing in that time. I am maybe missing something. (I have too many contexts now) |
I share @pirat89's sentiment. I see no reason why the logfile entries should be intermixed. We have one logger handler for the logfile. Can you think of any scenario when we would need more than one logfile logging handler? |
Each actor has it's own handler, but as @pirat89 pointed out, there is no parallel processing of actors ATM, maybe I'm thinkig too much in the future. OK, I'll try to modify the logging so that only one logging prefix is used for the whole output of one executed command. |
Packaging - Fix URL and Source0 in the SPEC file ===================================================================== Framework * Fixes - Add workround patch for the multiprocessing library - Exit non-zero on unhandled exceptions and errors - Fix actor library loading, so libs do not have to be imported in lexicographical order - Fix buf with mode inheritance and list field (oamg#203) - Fix warning about membership check of models when (oamg#503) - Load checkpoint ordered by `id` instead of timestamp to prevent issues with changed timezone (oamg#499) - Log on the ERROR level by default instead of DEBUG - Print usage to stderr * Enhancements - Add phase name checking to workflow parameters - Add the fetch_upgrade_report_raw() function to obtain raw report data - Create a dynamic configuration phase that allows creation of configuration for repository workflow - Functionalite getting actor and phase names when working with a workflow ===================================================================== Leapp * Fixes - Add checks of arguments for cmdline parameters - Load checkpoint ordered by `id` instead of timestamp to prevent issues with changed timezone (oamg#499) * Enhancements - Add JSON report generation - Add the preupgrade subcommand for the leapp tool that stops workflow execution after the Reports phase and display info about generated report ===================================================================== Snactor * Fixes - Add a simple logger to snactor discover command to avoid spurious output about missing logger - Add checks of arguments for cmdline parameters - Exit non-zero on unhandled exceptions and errors - Load checkpoint ordered by `id` instead of timestamp to prevent issues with changed timezone (oamg#499) ===================================================================== stdlib * Fixes - Add checks of arguments for cmdline parameters * Enhancements - Log output of commands to logfile (oamg#520) - stdlib: add option to `run()` to ignore exit code ===================================================================== Modifications - introduced conftest.py to utilize fixture mechanism, so fixture doesn't have to be imported explicitly in tests. - refactoring to satisfy linters
Packaging - Fix URL and Source0 in the SPEC file ===================================================================== Framework * Fixes - Add workround patch for the multiprocessing library - Exit non-zero on unhandled exceptions and errors - Fix actor library loading, so libs do not have to be imported in lexicographical order - Fix buf with mode inheritance and list field (#203) - Fix warning about membership check of models when (#503) - Load checkpoint ordered by `id` instead of timestamp to prevent issues with changed timezone (#499) - Log on the ERROR level by default instead of DEBUG - Print usage to stderr * Enhancements - Add phase name checking to workflow parameters - Add the fetch_upgrade_report_raw() function to obtain raw report data - Create a dynamic configuration phase that allows creation of configuration for repository workflow - Functionalite getting actor and phase names when working with a workflow ===================================================================== Leapp * Fixes - Add checks of arguments for cmdline parameters - Load checkpoint ordered by `id` instead of timestamp to prevent issues with changed timezone (#499) * Enhancements - Add JSON report generation - Add the preupgrade subcommand for the leapp tool that stops workflow execution after the Reports phase and display info about generated report ===================================================================== Snactor * Fixes - Add a simple logger to snactor discover command to avoid spurious output about missing logger - Add checks of arguments for cmdline parameters - Exit non-zero on unhandled exceptions and errors - Load checkpoint ordered by `id` instead of timestamp to prevent issues with changed timezone (#499) ===================================================================== stdlib * Fixes - Add checks of arguments for cmdline parameters * Enhancements - Log output of commands to logfile (#520) - stdlib: add option to `run()` to ignore exit code ===================================================================== Modifications - introduced conftest.py to utilize fixture mechanism, so fixture doesn't have to be imported explicitly in tests. - refactoring to satisfy linters
No description provided.