10 |
// included in the software distribution, or visit |
// included in the software distribution, or visit |
11 |
// http://www.fsf.org/licenses/gpl.html. |
// http://www.fsf.org/licenses/gpl.html. |
12 |
// |
// |
13 |
// $Log$ |
// $Id$ |
14 |
// Revision 1.3 2004/12/26 09:35:23 skunix |
|
|
// use logging functionality |
|
|
// |
|
|
// Revision 1.2 2004/12/26 08:03:34 skunix |
|
|
// changed lambda::bind's to boost::binds |
|
|
// |
|
|
// Revision 1.1 2004/12/26 02:29:33 skunix |
|
|
// Texture manager basics written, and texture-meta-parser added |
|
|
// |
|
|
// |
|
15 |
#include <fstream> |
#include <fstream> |
16 |
#include <deque> |
#include <deque> |
17 |
|
|
91 |
boost::filesystem::ifstream file; |
boost::filesystem::ifstream file; |
92 |
boost::filesystem::path directory = p.branch_path(); |
boost::filesystem::path directory = p.branch_path(); |
93 |
|
|
94 |
log::Stream2 logstream; |
log::BufferedStream logstream; |
95 |
unsigned line_num(0); |
unsigned line_num(0); |
96 |
std::string line; |
std::string line; |
97 |
file.open(p); |
file.open(p); |
98 |
|
|
99 |
if (!file.is_open()) |
if (!file.is_open()) |
100 |
{ |
{ |
101 |
logstream << log::set_level(log::Level::ERROR) << "couldnt open\n" <<log::Commit; |
logstream << log::set_level(log::Level::ERROR) << "couldnt open\n" << log::commit; |
102 |
return false; |
return false; |
103 |
} |
} |
104 |
|
|
147 |
{ |
{ |
148 |
boost::format msg("%1% in on line %3% of \"%2%\""); |
boost::format msg("%1% in on line %3% of \"%2%\""); |
149 |
msg % er.get<1>() % p.native_file_string()% line_num ; |
msg % er.get<1>() % p.native_file_string()% line_num ; |
150 |
logstream << log::set_level(log::Level::WARNING) << msg.str() << log::Commit; |
logstream << log::set_level(log::Level::WARNING) << msg.str() << log::commit; |
151 |
} |
} |
152 |
} |
} |
153 |
add(&x); |
add(&x); |