[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: icecream/services
From: Stephan Kulow <coolo () kde ! org>
Date: 2006-07-09 9:57:13
Message-ID: 1152439033.036872.21668.nullmailer () svn ! kde ! org
[Download RAW message or body]
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic