<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">@Dave , I understand your reluctance for new dependencies, but "use</span><br style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">something standard" and no external dependency are inherently</span><br style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">contradictory :). `loguru` is header only. We could "wrap" it under a</span><br style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">VTK-specific header and then use loguru internally, only if enabled.</span><br style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">But since logs should always be generatable to be useful, I don't see</span><br style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">who would want to build without logging enabled.</span><br clear="all"></blockquote><div><br></div><div>:)</div><div><br></div><div>Yes, loguru seems really lightweight. As long as we use Ben's best practices so that it can be updated and upstreamed and use system we'll be fine.</div><div><br></div><div>Until the logging proves itself to be "essential enough" (whatever that means) I recommend that we keep the dependency optional. Then when someone is trying to deploy a VTK enabled app on some strange system or distro and they hit a hard and weirdo compile error, they can make due.</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>David E DeMarle<br>Kitware, Inc.<br>Principal Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 8, 2018 at 8:27 AM Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">@Andras, as Allie mentioned, the vtkDebugMacro is woefully inadequate.<br>
I'd recommend scanning the logs generated by loguru. They are<br>
immensely superior is quality than any VTK-based log dump. While we<br>
could change all of the message processing to go via the logging<br>
infrastructure, that'd probably be a separate discussion since it'll<br>
depend greatly on which logging infrastructure we pick.<br>
<br>
@Dave , I understand your reluctance for new dependencies, but "use<br>
something standard" and no external dependency are inherently<br>
contradictory :). `loguru` is header only. We could "wrap" it under a<br>
VTK-specific header and then use loguru internally, only if enabled.<br>
But since logs should always be generatable to be useful, I don't see<br>
who would want to build without logging enabled.<br>
<br>
<br>
On Tue, Aug 7, 2018 at 5:55 PM David E DeMarle <<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>> wrote:<br>
><br>
> +1, lending moral support for the idea of better log facilities.<br>
><br>
> +0 for loguru. +1 for yeah by all means lets use something standard<br>
> and good but -1 for any new non critical dependency<br>
><br>
> Although I too have only rarely ever found vtkDebugMacro to be useful<br>
> in practice I still think it should feed into the new logs rather than<br>
> be some independent feature. Same goes for timerlogs - they should<br>
> interoperate sooner rather than later.<br>
><br>
> David E DeMarle<br>
> Kitware, Inc.<br>
> Principal Engineer<br>
> 21 Corporate Drive<br>
> Clifton Park, NY 12065-8662<br>
> Phone: 518-881-4909<br>
><br>
> On Tue, Aug 7, 2018 at 1:25 PM Allie Vacanti<br>
> <<a href="mailto:allison.vacanti@kitware.com" target="_blank">allison.vacanti@kitware.com</a>> wrote:<br>
> ><br>
> > +1. The loguru outputs I've seen are very nice.<br>
> ><br>
> > I tend to find the vtkObject::Debug logging to be largely useless, as it prints very verbose information and it's usually easier to just add a manual print statement when something like this is needed. Source modification is usually needed to set the Debug flag on, and at that point, why not just dump the exact piece of info we care about, when we care about it? I<br>
> ><br>
> > Something that would let us categorize the log entries ('rendering' for mappers/renderers, 'pipeline' for executive info, 'filter' for algorithm details, 'dataset' for dataset changes, 'verbose' for every-little-set-and-get-ever) to more easily filter out the stuff we're not interested in would be fantastic.<br>
> ><br>
> > On Tue, Aug 7, 2018 at 1:03 PM, Andras Lasso <<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>> wrote:<br>
> >><br>
> >> VTK has already a logging API that sends messages to stdout/stderr by default but it can be easily configured to send messages to any logging system. Do you mean you would keep the current logging API and just change the default logging backend to something more sophisticated?<br>
> >><br>
> >> Somewhat related issue: For me, it has never been completely clear how VTK debug logs could be used in practice, as most often it is very difficult to set DebugOn for an object (or group of relevant objects). It would be probably better to enable logging by default for all objects and split current debug level to 3 levels (info/debug/trace) for better control of verbosity.<br>
> >><br>
> >> Andras<br>
> >> ________________________________<br>
> >> From: "Scott, W Alan via vtk-developers" <<a href="mailto:vtk-developers@public.kitware.com" target="_blank">vtk-developers@public.kitware.com</a>><br>
> >> Sent: Tuesday, August 7, 2018 6:38 PM<br>
> >> To: Ayachit, Utkarsh (External Contacts); <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
> >> Subject: Re: [vtk-developers] [EXTERNAL] Support for logging<br>
> >><br>
> >> Great idea.  For someone that doesn't know where to place breakpoints, but has to try to debug datasets that cannot be sent to Kitware, this would be incredibly valuable.<br>
> >><br>
> >> Alan<br>
> >><br>
> >> ________________________________________<br>
> >> From: vtk-developers <<a href="mailto:vtk-developers-bounces@public.kitware.com" target="_blank">vtk-developers-bounces@public.kitware.com</a>> on behalf of Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>><br>
> >> Sent: Tuesday, August 7, 2018 8:29 AM<br>
> >> To: <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
> >> Subject: [EXTERNAL] [vtk-developers] Support for logging<br>
> >><br>
> >> Folks,<br>
> >><br>
> >> Of late I've been finding myself needing some sort of logging support<br>
> >> when debugging complex issues in ParaView and the more I thought about<br>
> >> it, the more I realized it should really be in VTK too and hence this<br>
> >> email.<br>
> >><br>
> >> I wonder what folks thought about adding support for generating logs<br>
> >> to VTK. This goes beyond the vtkTimerLog we currently have.<br>
> >> vtkTimerLog is great to log filter execution times etc. but it lacks<br>
> >> features like levels of verbosity, among others that are needed in a<br>
> >> general purpose logging infrastructure. We could potentially make<br>
> >> vtkTImerLog use the chosen logging infrastructure under the covers,<br>
> >> but that's a separate discussion and not entirely relevant to the<br>
> >> topic at hand.<br>
> >><br>
> >> To illustrate a case where this is useful in VTK: has anyone ever<br>
> >> tried to debug why a filter is re-executing? One often ends up in the<br>
> >> weeds of vtkExecutive and subclass and is fraught with frustration.<br>
> >> Now, imagine that the vtkExecutive subclass just generated a log<br>
> >> indicate which pipeline pass it's executing, and why -- things would<br>
> >> be so easy! The log could be added only at higher levels of verbosity,<br>
> >> thus not pollute application logs with internal details, but would be<br>
> >> easily generate-able/accessible when needed. Same is true for<br>
> >> rendering pipelines, determining if the VBOs, for example, are being<br>
> >> regenerated and why can be easily logged and aid tracking down<br>
> >> performance issues.<br>
> >><br>
> >> If we are convinced of the need for a logging support, then the<br>
> >> question becomes which logging library to use? I have been using for<br>
> >> loguru[1] with great success for a multi-threaded app. I love it's<br>
> >> output generation style, plus how well it handles logs from multiple<br>
> >> threads. It's C++ friendly, header only, minimal external<br>
> >> dependencies.<br>
> >><br>
> >> Thoughts? Suggestions?<br>
> >><br>
> >> Utkarsh<br>
> >><br>
> >><br>
> >> [1] <a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Femilk%2Floguru&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=CiukFppwivi35wrjPasMsrHDDl6qYr4wEhjsnQDWlww%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Femilk%2Floguru&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=CiukFppwivi35wrjPasMsrHDDl6qYr4wEhjsnQDWlww%3D&amp;reserved=0</a><br>
> >> _______________________________________________<br>
> >> Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=2knVTY4AKF5un%2BtsHBC6d9IwxdQU3fcg8k2B0F4y6eE%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=2knVTY4AKF5un%2BtsHBC6d9IwxdQU3fcg8k2B0F4y6eE%3D&amp;reserved=0</a><br>
> >><br>
> >> Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=FGooxIKSrpR%2F9M%2BqZSmIbUqWzgTWcmQdCIrCzGac0JI%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=FGooxIKSrpR%2F9M%2BqZSmIbUqWzgTWcmQdCIrCzGac0JI%3D&amp;reserved=0</a><br>
> >><br>
> >> Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=5yBu79VulvgbW7TSIX5NUsCbR5qUNTliI0U5Ax3yZ%2Bs%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=5yBu79VulvgbW7TSIX5NUsCbR5qUNTliI0U5Ax3yZ%2Bs%3D&amp;reserved=0</a><br>
> >><br>
> >> Follow this link to subscribe/unsubscribe:<br>
> >> <a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=VOEka8wGfLzP3j5hAQUVLPFV9XS1CMolWwPCpzSgj3A%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=VOEka8wGfLzP3j5hAQUVLPFV9XS1CMolWwPCpzSgj3A%3D&amp;reserved=0</a><br>
> >><br>
> >> _______________________________________________<br>
> >> Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=2knVTY4AKF5un%2BtsHBC6d9IwxdQU3fcg8k2B0F4y6eE%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=2knVTY4AKF5un%2BtsHBC6d9IwxdQU3fcg8k2B0F4y6eE%3D&amp;reserved=0</a><br>
> >><br>
> >> Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=FGooxIKSrpR%2F9M%2BqZSmIbUqWzgTWcmQdCIrCzGac0JI%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=FGooxIKSrpR%2F9M%2BqZSmIbUqWzgTWcmQdCIrCzGac0JI%3D&amp;reserved=0</a><br>
> >><br>
> >> Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=5yBu79VulvgbW7TSIX5NUsCbR5qUNTliI0U5Ax3yZ%2Bs%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=5yBu79VulvgbW7TSIX5NUsCbR5qUNTliI0U5Ax3yZ%2Bs%3D&amp;reserved=0</a><br>
> >><br>
> >> Follow this link to subscribe/unsubscribe:<br>
> >> <a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=VOEka8wGfLzP3j5hAQUVLPFV9XS1CMolWwPCpzSgj3A%3D&amp;reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtk-developers&amp;data=02%7C01%7Classo%40queensu.ca%7C0d8cae5a8ec54917f3b408d5fc842b32%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636692567166365790&amp;sdata=VOEka8wGfLzP3j5hAQUVLPFV9XS1CMolWwPCpzSgj3A%3D&amp;reserved=0</a><br>
> >><br>
> >><br>
> >> _______________________________________________<br>
> >> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
> >><br>
> >> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> >><br>
> >> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
> >><br>
> >> Follow this link to subscribe/unsubscribe:<br>
> >> <a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
> >><br>
> >><br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
> ><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
><br>
</blockquote></div>