mail[Wesnoth-commits] r33849 - /trunk/src/formula_function.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by dragonking on March 19, 2009 - 01:29:
Author: dragonking
Date: Thu Mar 19 01:29:06 2009
New Revision: 33849

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33849&view=rev
Log:
Made debug_print function print to info level, instead to stdout

Modified:
    trunk/src/formula_function.cpp

Modified: trunk/src/formula_function.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_function.cpp?rev=33849&r1=33848&r2=33849&view=diff
==============================================================================
--- trunk/src/formula_function.cpp (original)
+++ trunk/src/formula_function.cpp Thu Mar 19 01:29:06 2009
@@ -22,6 +22,9 @@
 
 
 #define DBG_NG LOG_STREAM(debug, engine)
+#define LOG_AI LOG_STREAM(info, formula_ai)
+#define WRN_AI LOG_STREAM(warn, formula_ai)
+#define ERR_AI LOG_STREAM(err, formula_ai)
 
 namespace game_logic {
 
@@ -176,13 +179,13 @@
                if( args().size() == 1)
                {
                        str1 = var1.to_debug_string();
-                       std::cout<< str1 << std::endl;
+                       LOG_AI << str1 << std::endl;
                        return var1;
                } else {
                        str1 = var1.string_cast();
                        const variant var2 = args()[1]->evaluate(variables);
                        str2 = var2.to_debug_string();
-                       std::cout<< str1 << str2 << std::endl;
+                       LOG_AI << str1 << str2 << std::endl;
                        return var2;
                }
        }




Related Messages


Powered by MHonArc, Updated Thu Mar 19 15:20:41 2009