From aa33bc22ec4cd14e200ba9e09c43e884a2101a74 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 22 Oct 2007 17:40:39 +0000 Subject: basis system console --- src/common/file.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/common/file.cc') diff --git a/src/common/file.cc b/src/common/file.cc index 2ebd457..d7603c3 100644 --- a/src/common/file.cc +++ b/src/common/file.cc @@ -6,9 +6,7 @@ // project headers #include "file.h" - -// C++ headers -#include +#include "console.h" namespace common { @@ -29,7 +27,7 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(filename); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { - std::cerr << "File opened " << fn << std::endl; + condebug << "File opened " << fn << std::endl; return; } @@ -38,7 +36,7 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(moddir); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { - std::cerr << "File opened " << fn << std::endl; + condebug << "File opened " << fn << std::endl; return; } } @@ -49,7 +47,7 @@ void File::open(const char * filename, ios_base::openmode mode) fn.append(filename); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { - std::cerr << "File opened " << fn << std::endl; + condebug << "File opened " << fn << std::endl; return; } @@ -61,10 +59,11 @@ void File::open(const char * filename, ios_base::openmode mode) // FIXME console if (!this->is_open()) { - std::cerr << "File could not open " << filename << std::endl; + condebug << "File could not open " << filename << std::endl; } else { - std::cerr << "File opened " << fn << std::endl; + conmesg << "File opened " << fn << std::endl; } } } // namespace common + -- cgit v1.2.3