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
Recommendation to prune archive is printed to stdout, breaking JSON output #137
Comments
We will need to consider our options here. So in your case - check lvm.conf and set this: log { report_command_log = 1 } However we have noticed there are some weird stuff - so there might be possible some patch needed for correction functionality. Question is - whether this should be a default. Also for considering could be to recognize 'non-shell' stdout and possibly behave differently and use this separate logging in auto-detected more (i.e. = 2) Some more options how to solve this are likely possible. |
If the archive for a VG is too large,
vgs
prints a message that recommends pruning it to stdout [1], which breaks JSON output. Minimal reproducer (for a VG namedspam
):Passing
-qq
silences the warning, which is fine as a workaround, but printing the message to stderr instead of stdout might be nicer. What do you think?There might be other messages being printed to stdout that cause similar problems, but I only saw this particular message so far.
[1] https://sourceware.org/git/?p=lvm2.git;a=blob;f=lib/format_text/archive.c;h=5acf0c04a;hb=38e0c7a1#l222
The text was updated successfully, but these errors were encountered: