X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDebug.cxx;h=81c5c819f61207754ff265523b1f8632df048080;hb=c4e7cd167fff93d40374a4cd88dbeab78797127f;hp=31afc8e785eed1022428a0137242178cc17013fd;hpb=6d79b5e185867ef00629f1ccb279c32daa6357d2;p=gdcm.git diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index 31afc8e7..81c5c819 100644 --- a/src/gdcmDebug.cxx +++ b/src/gdcmDebug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 16:50:32 $ - Version: $Revision: 1.29 $ + Date: $Date: 2006/01/03 14:28:53 $ + Version: $Revision: 1.30 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,6 +28,7 @@ namespace gdcm const int Debug::LINE_LENGTH = 79; bool Debug::DebugFlag = false; +bool Debug::LogFlag = false; bool Debug::WarningFlag = false; bool Debug::OutputToFile = false; @@ -66,12 +67,28 @@ void Debug::SetDebugFlag (bool flag) */ void Debug::SetWarningFlag (bool flag) { - // Cannot unset Warning flag if Debug flag is on. - if (flag == false && DebugFlag == true) - return; + // Cannot unset Warning flag if Debug flag is on or if LogFlag is on. + if (flag == false) + { + if (DebugFlag == true) + return; + if (LogFlag == true) + return; + } WarningFlag = flag; } +/** + * \brief Sets the log flag + * @param flag Set the log flag + */ +void Debug::SetLogFlag (bool flag) +{ + // To log oddities, both flags are necessary + WarningFlag = flag; + LogFlag = flag; +} + /** * \brief Accessor * @param flag whether we want to redirect to file