-
Notifications
You must be signed in to change notification settings - Fork 188
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
proper way to disable stout verbose logs #129
Comments
I saw there is the option to set the out as nullptr. It works by avoiding the outputs and in one use case by PCL by convexhull it makes the elaboration time 20% faster but it is still not satisafctory becasue all around the qhull lib there are plenty of xxprintf() and related stuff still running and active (even if redirected to nullptr) creating unnecesary CPU overhead. Can we disable those parts of code with conditions similar to if (fp) ?? |
The Qhull library contains multiple options for controlling the output. The "undesired" output is from option 's'. It is the default option if no options are provided to Qhull. In addition, the Qhull library includes qh_fprintf.c/.h These files define the qh_printf function. qh_fprintf handles Qhull's output. You can redefine qh_fprintf according to the msgcode (option 'Ta'). You may need to discuss your issue with the PCL developers. |
Yes thanks, I apologize but I got lost in all those options. Which is the proper way to disable that option? "-s"? Still I am not understanding : the documentation says those "s" outputs are sent to stderr, while in the PCL stderr is by default redirected to nullptr and the "undesired" output i had was on stdout (which I after also redirected to nullptr as an option). in PCL out and err file descriptors are passed to as outfile and errfile as far as i understood. I disabled the "undesired" outputs by setting outfile=nullptr by the way i see now that PCL redirects errfile to nullptr but that is useless because the code inside qh_new_qhull if(!errfile){ Why not adding conditions of the kind if (file_descriptor) That would make all lines of codes skipped in the case when the file descriptor is redirected to nullptr I will further study the matter (and the code) and get back |
It's quite complicated to follow all this matter through the code but I suppose the sort of if (file_descriptor) is already implemented for the outfile
so I think I might be happy with that (setting outfile=nullptr when I don't need it) I keep though disliking the code if(!errfile){ inside qh_new_qhull thank you so much |
do you mean the files userprintf_r.c and userprintf.c ? |
I have avoided the most of unwanted out log by setting outfile=nullptr inside PCL. Still I am getting some less frequent flood of unwanted output on stderr, for that I opened anothe rissue |
When i use Convex Hull in PCL I get a low of undesired outputs like
Convex hull of 81350 points in 2-d:
Number of vertices: 24 Number of facets: 24
Statistics for: | qhull FA
Number of points processed: 24 Number of hyperplanes created: 46 Number of distance tests for qhull: 540934 CPU seconds to compute hull (after input): 0.005 Total facet area: 0.56994136 Total volume: 0.017731251
how to disable them?
I don't see an option
thanks
The text was updated successfully, but these errors were encountered: