- static int GetDebugFlag ();
- static void SetDebugFlag (int flag);
- static void SetDebugOn () { SetDebugFlag(1); };
- static void SetDebugOff () { SetDebugFlag(0); };
+ static void SetDebugFlag (bool flag);
+ static bool GetDebugFlag ();
+ static void DebugOn () { SetDebugFlag(true); };
+ static void DebugOff () { SetDebugFlag(false); };
+
+ /// This is a global flag that controls if debug are redirected
+ /// to a file or not
+ static void SetDebugToFile (bool flag);
+ static bool GetDebugToFile ();
+ static void DebugToFileOn () { SetDebugToFile(true); };
+ static void DebugToFileOff () { SetDebugToFile(false); };
+
+ /// Set the filename the debug stream should be redirect to
+ /// Settting a filename also set DebugToFile to true
+ static void SetDebugFilename (std::string const& filename);
+
+ /// Internal use only. Allow us to retrieve the static from anywhere
+ /// in gdcm code
+ static std::ofstream &GetDebugFile ();