- * \brief Assert
- * @param Level level
- * @param Test test
- * @param Msg1 first message part
- * @param Msg2 second message part
- */
- void gdcmDebug::Assert(int Level, bool Test,
- const char * Msg1, const char * Msg2) {
- if (Level > DebugLevel)
- return ;
- if (!Test)
- std::cerr << Msg1 << ' ' << Msg2 << std::endl;
+ * \brief Set the filename the debug stream should be redirect to
+ * Settting a filename also sets DebugToFile to true
+ * @param filename File to redirect debug info
+ * Absolutely nothing is check. You have to pass in
+ * a correct filename
+ */
+void Debug::SetDebugFilename (std::string const &filename)
+{
+ DebugToFile = true; // Just in case ...
+ DebugFlag = true; // Just in case ...
+ if ( DebugFile.is_open() )
+ DebugFile.close();
+ DebugFile.open( filename.c_str() );