<div dir="ltr"><div><div>Hi Folks, <br><br></div>To get the full picture, within CTK, we have the following classes:<br><br></div>* ctkErrorLogModel [1]:  Centralize messages captured by message handlers. <br><br><div>* ctkErrorLogWidget [2]: Present the messages from the model into a view<br><br><br><br></div><div>Message handlers:<br></div><div><br></div><div>* ctkErrorLogStatusMessageHandler [3]: Capture and log messages displayed in the status bar<br><br>* ctkErrorLogStreamMessageHandler [4]: Capture and log messages "printed" on std::cout and std::cerr<br><br>* ctkErrorLogQtMessageHandler [5]: Capture and log messages "printed" using qWarning/qDebug/...<br><br>* ctkErrorLogFDMessageHandler [6]: Capture and log messages "printed" on stdout and stderr file descriptor<br><br>* ctkITKErrorLogMessageHandler [7]: Capture and log messages "printed" using ITK macros<br><br>* ctkVTKErrorLogMessageHandler [8]: Capture and log messages "printed" using VTK macros<br> <br><br><br></div><div>Thanks<br></div><div>Jc<br></div><div><br><br><br>[1] <a href="https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkErrorLogModel.h">https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkErrorLogModel.h</a><br><br>[2] <a href="https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkErrorLogWidget.h">https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkErrorLogWidget.h</a><br><br>[3] <a href="https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkErrorLogStatusMessageHandler.h">https://github.com/commontk/CTK/blob/master/Libs/Widgets/ctkErrorLogStatusMessageHandler.h</a><br><br>[4] <a href="https://github.com/commontk/CTK/blob/master/Libs/Core/ctkErrorLogStreamMessageHandler.h">https://github.com/commontk/CTK/blob/master/Libs/Core/ctkErrorLogStreamMessageHandler.h</a><br><br>[5] <a href="https://github.com/commontk/CTK/blob/master/Libs/Core/ctkErrorLogQtMessageHandler.h">https://github.com/commontk/CTK/blob/master/Libs/Core/ctkErrorLogQtMessageHandler.h</a><br><br>[6] <a href="https://github.com/commontk/CTK/blob/master/Libs/Core/ctkErrorLogFDMessageHandler.h">https://github.com/commontk/CTK/blob/master/Libs/Core/ctkErrorLogFDMessageHandler.h</a><br><br>[7] <a href="https://github.com/commontk/CTK/blob/master/Libs/ImageProcessing/ITK/Core/ctkITKErrorLogMessageHandler.h">https://github.com/commontk/CTK/blob/master/Libs/ImageProcessing/ITK/Core/ctkITKErrorLogMessageHandler.h</a><br><br>[8] <a href="https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Core/ctkVTKErrorLogMessageHandler.h">https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Core/ctkVTKErrorLogMessageHandler.h</a><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 13, 2014 at 5:41 PM, Steve Pieper <span dir="ltr"><<a href="mailto:pieper@isomics.com" target="_blank">pieper@isomics.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Andras - <div><br></div><div>I'm on record from previous discussions on the vtk developer list that I'd like to make vtk smaller (e.g. move vtkChemistry, GeoVis and similar things into their own add-on libraries [1]).  But on this one I actually agree with your argument that VTK really should have a provision for this rather than leaving it to each application to develop a custom solution.  Berk seems to have dug in his heels though, so maybe just add the feature to CTK?  Or leaving it in Slicer is okay by me too.</div><div><br></div><div>-Steve</div><div><br></div><div>[1] <a href="http://vtk.1045678.n5.nabble.com/Driving-away-your-existing-developers-td5728448.html" target="_blank">http://vtk.1045678.n5.nabble.com/Driving-away-your-existing-developers-td5728448.html</a></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 13, 2014 at 5:09 PM, Andras Lasso <span dir="ltr"><<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>
<div>
<div>
<div style="font-family:Calibri,sans-serif;font-size:11pt">The only reason for using macro is to be able to get the line number and file name. The rest is handled by output window and logger classes.
<br>
<br>
Andras</div>
</div>
<div dir="ltr">
<hr>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">From:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:bill.lorensen@gmail.com" target="_blank">Bill Lorensen</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Sent:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt">‎2014-‎12-‎13 16:58</span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">To:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:lasso@queensu.ca" target="_blank">Andras Lasso</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Cc:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:ctk-developers@commontk.org" target="_blank">ctk-developers@commontk.org</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Subject:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt">Re: [Ctk-developers] Info level logging macro in VTK</span><br>
<br>
</div>
</div><div><div>
<font><span style="font-size:10pt">
<div>Personally, I do not like macros. For this functionality I would<br>
prefer a logging class like we have in ITK.<br>
<br>
Bill<br>
<br>
<br>
On Sat, Dec 13, 2014 at 4:32 PM, Andras Lasso <<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>> wrote:<br>
> Hi all,<br>
><br>
><br>
><br>
> We are having a discussion with VTK developers about the necessity for a<br>
> vtkInfoMacro (or vtkGenericOutputMacro) in addition to vtkErrorMacro,<br>
> vtkWarningMacro, and vtkDebugMacro in VTK [1] . The new macro would offer a<br>
> standard way of logging non-error messages from VTK-derived application<br>
> classes, tests, and examples. For example, you would not need to specify a<br>
> separate application-specific LOG_INFO macro in your application for logging<br>
> non-error messages while using the VTK standard vtkErrorMacro and<br>
> vtkWarningMacro for errors.<br>
><br>
><br>
><br>
> The next step would be asking for moving the log message formatting from the<br>
> VTK logging macros to the vtkOutputWindow class. That would allow getting<br>
> rid of the ugly multi-line VTK error messages, because in a custom<br>
> vtkOutputWindow class the application could format the fields (message, line<br>
> number, etc.) in any way or it could send the info to the application logger<br>
> (there would be no need to parse the VTK error messages anymore to extract<br>
> the fields).<br>
><br>
><br>
><br>
> It would help the discussion on the VTK list a lot if we know the opinion,<br>
> needs of more application developers:<br>
><br>
> * Do you find the current VTK error/warning/debug logging convenient for<br>
> your application?<br>
><br>
> * Would you use INFO level logging in VTK-based classes in your application?<br>
><br>
> * Would you like to have customizable formatting of VTK error/warning<br>
> messages? (e.g., have compact, single-line messages; or be able to have the<br>
> message, line number, file name, etc. separately so that you can send it to<br>
> your application’s logger)<br>
><br>
><br>
><br>
> Thanks in advance.<br>
><br>
> Andras<br>
><br>
><br>
><br>
> [1]<br>
> <a href="http://public.kitware.com/pipermail/vtk-developers/2014-December/031102.html" target="_blank">
http://public.kitware.com/pipermail/vtk-developers/2014-December/031102.html</a><br>
><br>
><br>
> _______________________________________________<br>
> Ctk-developers mailing list<br>
> <a href="mailto:Ctk-developers@public.kitware.com" target="_blank">Ctk-developers@public.kitware.com</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/ctk-developers</a><br>
><br>
<br>
<br>
<br>
-- <br>
Unpaid intern in BillsBasement at noware dot com<br>
</div>
</span></font>
</div></div></div>

<br>_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@public.kitware.com" target="_blank">Ctk-developers@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/ctk-developers</a><br>
<br></blockquote></div></div>
</div></div><br>_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@public.kitware.com">Ctk-developers@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/ctk-developers</a><br>
<br></blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature">+1 919 869 8849<br></div>
</div>