[ITK] Redirect ITK logging

Matt McCormick matt.mccormick at kitware.com
Thu May 14 11:10:04 EDT 2015


Yeap, it will work for itkGenericOutputMacro [1] [2] and itkWarningMacro [3].

[1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/Common/include/itkMacro.h;h=2389bbd3f9b1ba4e7ca87221e62f349db9c0ec99;hb=HEAD#l396

[2] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/Common/src/itkOutputWindow.cxx;h=6e59fc8d0fb6093034ed7be665789a2e6e39e11c;hb=HEAD#l71

[3] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/Common/include/itkMacro.h;h=2389bbd3f9b1ba4e7ca87221e62f349db9c0ec99;hb=HEAD#l316

On Thu, May 14, 2015 at 4:32 AM, Coert Metz <c.metz at quantib.com> wrote:
> Thanks for the suggestions! Very helpful! Will this approach catch all ITK
> logging? So both Logger output and the output of, for example, the
> itkGenericOutputMacro?
>
> Regards,
> Coert Metz
>
> On Wed, May 13, 2015 at 7:31 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> And here is an example that logs to a file.
>> http://itk.org/Wiki/ITK/Examples/Utilities/FileOutputWindow
>>
>>
>> On Wed, May 13, 2015 at 10:54 AM, Matt McCormick
>> <matt.mccormick at kitware.com> wrote:
>> > Hi Coert,
>> >
>> > Does inheriting from itk::OutputWindow [1] and setting the singleton
>> > instance [2] do what you need?
>> >
>> > HTH,
>> > Matt
>> >
>> > [1] http://www.itk.org/Doxygen/html/classitk_1_1OutputWindow.html
>> >
>> > [2]
>> > http://www.itk.org/Doxygen/html/classitk_1_1OutputWindow.html#a0503d987b75a36ca2b92d72c090fd6bd
>> >
>> > On Wed, May 13, 2015 at 8:46 AM, Coert Metz <c.metz at quantib.com> wrote:
>> >> Hi all,
>> >>
>> >> Is there a way to catch all log messages coming from ITK and redirect
>> >> them
>> >> to my own logger class? It seems there is a logger class and there also
>> >> are
>> >> macro's such as itkGenericOutputMacro. It is not completely clear to me
>> >> which methods are used to log messages within the ITK library and if I
>> >> can
>> >> catch these messages easily.
>> >>
>> >> Regards,
>> >> Coert Metz
>> >>
>> >>
>> >> This message may contain confidential or privileged information. If you
>> >> are
>> >> not the addressee, please notify the sender and delete it from your
>> >> files.
>> >> _______________________________________________
>> >> Community mailing list
>> >> Community at itk.org
>> >> http://public.kitware.com/mailman/listinfo/community
>> >>
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/mailman/listinfo/community
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
>
> --
> Coert Metz, PhD
> Research & Development Engineer  |  Quantib B.V.
> c.metz at quantib.com  |  +31 650 68 60 28
>
> This message may contain confidential or privileged information. If you are
> not the addressee, please notify the sender and delete it from your files.


More information about the Community mailing list