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

Goblint's stdout/stderr redirected into output #8 #11

Merged
merged 5 commits into from
Nov 17, 2021
Merged

Conversation

karoliineh
Copy link
Member

@karoliineh karoliineh commented Nov 12, 2021

Goblint's stdout/stderr redirected into output #8 and logging support added

  • All debug info that Goblint dumps is now redirected so that it is shown in the Output console in vscode. This is done with zt-exec, which has a method to redirect stdout and stderr to System.err.
  • As the default runCommand method from MagpieBridge's ToolAnalysis class is no longer used due to the need to use zt-exec's ProcessExecutor instead of ProcessBuilder, GoblintAnalysis now implements ServerAnalysis interface instead of ToolAnalysis.
  • Logging support was added with Log4j. Logs are shown in the Output console as well. The default level is info, but debug level can be used for development. For using debug level, log4j2.xml file must be edited.
  • On the info level, the command Goblint was executed with is logged as well as some additional info (e.g. magpie server started).
  • Some additional exception handling was added to prevent reading from a JSON file after the Goblint run fails, as there were exceptions when another file's analysis result was tried to be shown in a different file.

… added

All debug info that Goblint dumps is now redirected so that it is shown in the Output console in vscode. This is done with zt-exec, which has a method to redirect stdout and stderr to System.err.
As the default runCommand method from MagpieBridge's ToolAnalysis class is no longer used due to the need to use zt-exec's ProcessExecutor instead of ProcessBuilder, GoblintAnalysis now implements ServerAnalysis interface instead of ToolAnalysis.
Logging support was added with Log4j. Logs are shown in the Output console as well. The default level is info, but debug level can be used for development. For using debug level, log4j2.xml file must be edited.
On the info level, the command Goblint was executed with is logged as well as some additional info (e.g. magpie server started).
Some additional exception handling was added to prevent reading from a JSON file after the Goblint run fails, as there were exceptions when another file's analysis result was tried to be shown in a different file.
@sim642 sim642 added the enhancement New feature or request label Nov 16, 2021
Copy link
Member

@vesalvojdani vesalvojdani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to have it dumped to stderr for now. I would like to be able to configure that eventually, but I'm not sure if we want that to be set via goblint's conf files or some magpie specific setting.

src/main/java/GoblintAnalysis.java Outdated Show resolved Hide resolved
@karoliineh karoliineh merged commit 104dccd into master Nov 17, 2021
@karoliineh karoliineh linked an issue Nov 17, 2021 that may be closed by this pull request
4 tasks
@karoliineh karoliineh deleted the logging branch February 28, 2022 16:28
karoliineh pushed a commit that referenced this pull request Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show goblint's stdout/stderr in the GoblintAnalyzer output view
3 participants