[vtk-developers] [EXTERNAL] Support for logging
Jean-Christophe Fillion-Robin
jcfr at kitware.com
Thu Aug 9 00:36:49 EDT 2018
Hi,
Here are some suggestions and comment:
* using "loguru" (or any other logging backend) should be an implementation
details specific to the application using the library (e.g of application
ParaView, 3D Slicer, VTK examples, VTK tests, and many more).
* existing logging macros (vtkErrorMacro, vtkDebugMacro, ...) should be
kept around along with their existing behavior as well as the
vtkOutputWindow
* new categorical logging macro should be introduced.
- each message would be associated with a type (info, error, warning),
a category (e.g vtk.rendering.opengl2.shaderprogram) and a context (line,
file, function)
- for sake of performance, context would be available only for
Debug (and may be RelWithDebInfo) or only if explicitly enabled
- enable/disable logging at run-time based on rules, ...
- this presentation nicely summarizes the type of features that could
be integrated in VTK. See https://www.kdab.com/wp-content/uploads/stories/
slides/Day2/KaiKoehne_Qt%20Logging%20Framework%2016_9_0.pdf
* since it is not uncommon to have application using both ITK and VTK,
would also be nice to discussed with ITK community
Such approach would allow to gradually transition existing VTK module to
the new categorical logging and would prevent existing user code from
breaking
On Wed, Aug 8, 2018 at 4:08 PM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:
> We definitely should hide what ever third party spi.
>
> On Wed, Aug 8, 2018, 11:53 AM Sean McBride <sean at rogue-research.com>
> wrote:
>
>> On Wed, 8 Aug 2018 10:47:01 -0400, David Cole via vtk-developers said:
>>
>> >As strictly a client of VTK, I would like to express the strong desire
>> >to NOT get yet-another-logger added to my app just because I link in
>> >VTK. Please make sure it's "opt-in" only. We have two apps, one
>> >already uses log4cpp, and one uses g2log, and we just went through a
>> >large pain trying to turn off logging in one of our other client
>> >libraries.
>>
>> I had a similar thought. I haven't looked at this loguru, but hopefully
>> you can choose where it logs things to. On macOS for example, it would be
>> nice if VTK logging eventually invokes the os_log functions in
>> usr/include/os/log.h.
>>
>> Cheers,
>>
>> --
>> ____________________________________________________________
>> Sean McBride, B. Eng sean at rogue-research.com
>> Rogue Research www.rogue-research.com
>> Mac Software Developer Montréal, Québec, Canada
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/vtk-developers
>>
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20180809/b9687330/attachment.html>
More information about the vtk-developers
mailing list