[Ctk-developers] Info level logging macro in VTK
Andras Lasso
lasso at queensu.ca
Sat Dec 13 22:09:06 UTC 2014
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.
Andras
________________________________
From: Bill Lorensen<mailto:bill.lorensen at gmail.com>
Sent: 2014-12-13 16:58
To: Andras Lasso<mailto:lasso at queensu.ca>
Cc: ctk-developers at commontk.org<mailto:ctk-developers at commontk.org>
Subject: Re: [Ctk-developers] Info level logging macro in VTK
Personally, I do not like macros. For this functionality I would
prefer a logging class like we have in ITK.
Bill
On Sat, Dec 13, 2014 at 4:32 PM, Andras Lasso <lasso at queensu.ca> wrote:
> Hi all,
>
>
>
> We are having a discussion with VTK developers about the necessity for a
> vtkInfoMacro (or vtkGenericOutputMacro) in addition to vtkErrorMacro,
> vtkWarningMacro, and vtkDebugMacro in VTK [1] . The new macro would offer a
> standard way of logging non-error messages from VTK-derived application
> classes, tests, and examples. For example, you would not need to specify a
> separate application-specific LOG_INFO macro in your application for logging
> non-error messages while using the VTK standard vtkErrorMacro and
> vtkWarningMacro for errors.
>
>
>
> The next step would be asking for moving the log message formatting from the
> VTK logging macros to the vtkOutputWindow class. That would allow getting
> rid of the ugly multi-line VTK error messages, because in a custom
> vtkOutputWindow class the application could format the fields (message, line
> number, etc.) in any way or it could send the info to the application logger
> (there would be no need to parse the VTK error messages anymore to extract
> the fields).
>
>
>
> It would help the discussion on the VTK list a lot if we know the opinion,
> needs of more application developers:
>
> * Do you find the current VTK error/warning/debug logging convenient for
> your application?
>
> * Would you use INFO level logging in VTK-based classes in your application?
>
> * Would you like to have customizable formatting of VTK error/warning
> messages? (e.g., have compact, single-line messages; or be able to have the
> message, line number, file name, etc. separately so that you can send it to
> your application’s logger)
>
>
>
> Thanks in advance.
>
> Andras
>
>
>
> [1]
> http://public.kitware.com/pipermail/vtk-developers/2014-December/031102.html
>
>
> _______________________________________________
> Ctk-developers mailing list
> Ctk-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/ctk-developers
>
--
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20141213/58f1301e/attachment.htm>
More information about the Ctk-developers
mailing list