Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile.am2
-rw-r--r--src/common/file.cc15
2 files changed, 8 insertions, 9 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 86bb4e1..dbed1fb 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -3,6 +3,6 @@ METASOURCES = AUTO
libcommon_la_LDFLAGS = -avoid-version -no-undefined
noinst_LTLIBRARIES = libcommon.la
libcommon_la_SOURCES = color.cc color.h file.cc file.h functions.cc functions.h \
- vector3f.cc vector3f.h
+ vector3f.cc vector3f.h console.cc console.h
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 <iostream>
+#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
+