mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 12:43:44 -04:00
*** empty log message ***
This commit is contained in:
parent
3f57b391a8
commit
8b56b102e3
@ -319,7 +319,6 @@ get_category(const string &fullname) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
ostream &Notify::
|
ostream &Notify::
|
||||||
out() {
|
out() {
|
||||||
ptr()->_ostream_ptr->flush();
|
|
||||||
return *(ptr()->_ostream_ptr);
|
return *(ptr()->_ostream_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,16 +458,26 @@ config_initialized() {
|
|||||||
already_initialized = true;
|
already_initialized = true;
|
||||||
|
|
||||||
if (_ostream_ptr == &cerr) {
|
if (_ostream_ptr == &cerr) {
|
||||||
Filename notify_output = config_notify.GetString("notify-output", "");
|
string notify_output = config_notify.GetString("notify-output", "");
|
||||||
if (!notify_output.empty()) {
|
if (!notify_output.empty()) {
|
||||||
notify_output.set_text();
|
if (notify_output == "stdout") {
|
||||||
ofstream *out = new ofstream;
|
cout.setf(ios::unitbuf);
|
||||||
if (!notify_output.open_write(*out)) {
|
set_ostream_ptr(&cout, false);
|
||||||
nout << "Unable to open file " << notify_output << " for output.\n";
|
|
||||||
delete out;
|
} else if (notify_output == "stderr") {
|
||||||
|
set_ostream_ptr(&cerr, false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
out->setf(ios::unitbuf);
|
Filename filename = notify_output;
|
||||||
set_ostream_ptr(out, true);
|
filename.set_text();
|
||||||
|
ofstream *out = new ofstream;
|
||||||
|
if (!filename.open_write(*out)) {
|
||||||
|
nout << "Unable to open file " << filename << " for output.\n";
|
||||||
|
delete out;
|
||||||
|
} else {
|
||||||
|
out->setf(ios::unitbuf);
|
||||||
|
set_ostream_ptr(out, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user