Fix partly double printed debug.txt
authorceleron55 <celeron55@armada.(none)>
Mon, 17 Oct 2011 07:46:16 +0000 (10:46 +0300)
committerceleron55 <celeron55@armada.(none)>
Mon, 17 Oct 2011 07:46:16 +0000 (10:46 +0300)
src/main.cpp
src/servermain.cpp

index 80daf744937f763088606081dd47ae6a8502e511..be983676e31f11f6615b028b475dbf48be5aa2b3 100644 (file)
@@ -1074,15 +1074,15 @@ void drawMenuBackground(video::IVideoDriver* driver)
        }
 }
 
-class DstreamLogOutput: public ILogOutput
+class StderrLogOutput: public ILogOutput
 {
 public:
        /* line: Full line with timestamp, level and thread */
        void printLog(const std::string &line)
        {
-               dstream<<line<<std::endl;
+               std::cerr<<line<<std::endl;
        }
-} main_dstream_log_out;
+} main_stderr_log_out;
 
 class DstreamNoStderrLogOutput: public ILogOutput
 {
@@ -1100,7 +1100,7 @@ int main(int argc, char *argv[])
                Initialization
        */
 
-       log_add_output_maxlev(&main_dstream_log_out, LMT_ACTION);
+       log_add_output_maxlev(&main_stderr_log_out, LMT_ACTION);
        log_add_output_all_levs(&main_dstream_no_stderr_log_out);
 
        log_register_thread("main");
@@ -1175,7 +1175,7 @@ int main(int argc, char *argv[])
 #endif
        
        if(cmd_args.getFlag("info-on-stderr"))
-               log_add_output(&main_dstream_log_out, LMT_INFO);
+               log_add_output(&main_stderr_log_out, LMT_INFO);
 
        porting::signal_handler_init();
        bool &kill = *porting::signal_handler_killstatus();
index f3111c42d470af5d33f0572c3fb91221286a66db..73e1963c1f64616a52037fd0bc3930699e6a9a9c 100644 (file)
@@ -117,15 +117,15 @@ u32 getTimeMs()
        return porting::getTimeMs();
 }
 
-class DstreamLogOutput: public ILogOutput
+class StderrLogOutput: public ILogOutput
 {
 public:
        /* line: Full line with timestamp, level and thread */
        void printLog(const std::string &line)
        {
-               dstream<<line<<std::endl;
+               std::cerr<<line<<std::endl;
        }
-} main_dstream_log_out;
+} main_stderr_log_out;
 
 class DstreamNoStderrLogOutput: public ILogOutput
 {
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
                Initialization
        */
 
-       log_add_output_maxlev(&main_dstream_log_out, LMT_ACTION);
+       log_add_output_maxlev(&main_stderr_log_out, LMT_ACTION);
        log_add_output_all_levs(&main_dstream_no_stderr_log_out);
 
        log_register_thread("main");
@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
        }
 
        if(cmd_args.getFlag("info-on-stderr"))
-               log_add_output(&main_dstream_log_out, LMT_INFO);
+               log_add_output(&main_stderr_log_out, LMT_INFO);
 
        /*
                Basic initialization