-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added functionality to capture logs from Plebian and log them in Monarch #114
Added functionality to capture logs from Plebian and log them in Monarch #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the last commit version of the ProcessHostMonarch class, I implemented a cleaner and more modern coding style, along with improvements to logging and error handling.
Process initialisation: The process is now initialised using a more concise and readable object initialiser. The change from _process = new Process(); to _process = new Process { StartInfo = new ProcessStartInfo }
is more in line with modern C# practices, making the code cleaner and easier to follow.
Buffered output and error streams: The standard output and error streams are now explicitly set to buffer. This ensures that we capture all output for analysis.
When messages are logged from the buffer, the buffer is cleared to avoid logging the same messages again if the process is restarted.
… to improve error handling and logging
Very sorry to do that but I've noticed while testing that the whole restart mechanism did not work correctly (the restart actually failed and we did not actually set the error code) so I've revamped it and Fixed #116 in the process 😅 I've tried to implement your suggestions from #116 do you have any more ideas for clarifying the code? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome changes, great job
{Summary of the changes}
Description
{Detail}
Fixes #{issue number}