aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorceleron55 <celeron55@armada.(none)>2011-10-17 10:46:16 +0300
committerceleron55 <celeron55@armada.(none)>2011-10-17 10:46:16 +0300
commit30c21b4abd1b7458c30f267e23c9bd003ed0bc0a (patch)
tree19c9a57318ec2ca88b2f83fa7536b9d233644c5d /src
parentcfd19dcdb5ad7b623b3b7961577af6e9bbe18520 (diff)
downloadminetest-30c21b4abd1b7458c30f267e23c9bd003ed0bc0a.tar.gz
minetest-30c21b4abd1b7458c30f267e23c9bd003ed0bc0a.tar.bz2
minetest-30c21b4abd1b7458c30f267e23c9bd003ed0bc0a.zip
Fix partly double printed debug.txt
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp10
-rw-r--r--src/servermain.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 80daf7449..be983676e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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();
diff --git a/src/servermain.cpp b/src/servermain.cpp
index f3111c42d..73e1963c1 100644
--- a/src/servermain.cpp
+++ b/src/servermain.cpp
@@ -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