2002-07-14 Al Riddoch <alriddoch@zepler.org>

* ALL: Cleaned up headers into correct order.

	* common/log.h, common/log.cpp: Write some logging code which
	  handles message of different types using syslog or standard
	  error, depending on whether we are running as a daemon.

	* ALL: Switched to using log() for all output.
This commit is contained in:
Al Riddoch 2002-07-14 21:04:50 +00:00
parent 6ecd8767a9
commit 07a7543461
88 changed files with 536 additions and 505 deletions

View file

@ -8,12 +8,13 @@
#include "Py_Oplist.h"
#include "Py_Thing.h"
#include <common/debug.h>
#include "Entity.h"
#include "BaseMind.h"
#include "MemMap_methods.h"
#include <common/log.h>
#include <common/debug.h>
using Atlas::Objects::Operation::RootOperation;
PythonMindScript::PythonMindScript(PyObject * o, BaseMind & m) :
@ -88,8 +89,7 @@ bool PythonMindScript::Operation(const std::string & op_type,
debug( std::cout << "No method to be found for " << std::endl
<< std::flush;);
} else {
std::cerr << "Reporting python error for " << std::endl
<< std::flush;
log(ERROR, "Reporting python error");
PyErr_Print();
}
}