From kde-commits Sun Jul 09 09:57:13 2006 From: Stephan Kulow Date: Sun, 09 Jul 2006 09:57:13 +0000 To: kde-commits Subject: icecream/services Message-Id: <1152439033.036872.21668.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=115243904109857 SVN commit 560106 by coolo: I don't really understand the problem, but somehow the .close() can't be reopened M +6 -4 logging.cpp --- trunk/icecream/services/logging.cpp #560105:560106 @@ -32,7 +32,7 @@ ostream *logfile_warning = 0; ostream *logfile_error = 0; static ofstream logfile_null( "/dev/null" ); -static ofstream logfile_file; +static ofstream *logfile_file = 0; static string logfile_filename; void reset_debug( int ); @@ -42,11 +42,13 @@ debug_level = level; logfile_filename = filename; - logfile_file.close(); + delete logfile_file; + logfile_file = 0; ostream *output = 0; if ( filename.length() ) { - logfile_file.open( filename.c_str(), fstream::out | fstream::app ); - output = &logfile_file; + logfile_file = new ofstream(); + logfile_file->open( filename.c_str(), fstream::out | fstream::app ); + output = logfile_file; } else output = &cerr;