[Dcmlib] DebugMacro vs WarningMacro
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed Oct 26 16:01:51 CEST 2005
Jean-Pierre Roux wrote:
> Hi, everybody .
>
> Some times ago I read (well. .. I saw) some commit explaining we don't
> have to mixture DebugMacro and WarningMacro.
>
> I don't remember what was the purpose, but I'm not sure messages such as :
> "Last system error was: Success".
> was expected.
>
> Anyway, have we got really 'Warning' messages to ouput to the 'normal'
> user?
> Almost all I can find are informations we give the developper, to inform
> him how the process is running.
>
> Any opinion?
My goal is that Debug is for Debug, for developer. The Warning mechanism
is right now identical to Debug (output to the same stream as Debug).
But I would like later to generate output like dciodvfy, therefore I
*need* to differenciate what a debug comment is from a warning 'we
process this DICOM file only because we are smart enough'.
Basically the gdcmWarningMacro could output to std::log or a specific
file if we ever write a 'dciodvfy' like.
BTW when debugging with bcc5.5, I found extremely usefull to have
strerror() displayed. Therefore when gdcm start failing and I read that
the file was not open properly (file permissions...) I don't have to
waste my time. So yes I would like to keep this in DebugMacro.
2 cents,
Mathieu
More information about the Dcmlib
mailing list