Add source code module name to stdout/stderr messages to improve readability.

pull/1/head
Darrell Anderson 13 years ago
parent 6d38a39e6d
commit c9375a1ee2

@ -183,7 +183,7 @@ Dispatcher::Dispatcher(IOManager *ioManager, StartServer startServer)
if(!unixServer->running())
{
delete unixServer;
arts_warning("MCOP: couldn't start UnixServer");
arts_warning("[mcop dispatcher] Couldn't start UnixServer");
unixServer = 0;
}
}
@ -195,7 +195,7 @@ Dispatcher::Dispatcher(IOManager *ioManager, StartServer startServer)
if(!tcpServer->running())
{
delete tcpServer;
arts_warning("MCOP: couldn't start TCPServer");
arts_warning("[mcop dispatcher] Couldn't start TCPServer");
tcpServer = 0;
}
}
@ -216,7 +216,7 @@ Dispatcher::Dispatcher(IOManager *ioManager, StartServer startServer)
orig_sigpipe = signal(SIGPIPE,SIG_IGN);
if((orig_sigpipe != SIG_DFL) && (orig_sigpipe != SIG_IGN))
{
cerr << "mcop warning: user defined signal handler found for"
cerr << "[mcop dispatcher] warning: user defined signal handler found for"
" SIG_PIPE, overriding" << endl;
}
@ -283,7 +283,7 @@ Dispatcher::Dispatcher(IOManager *ioManager, StartServer startServer)
* happen. In this case, we will remove the cookie and overwrite it
* with our previously generated cookie.
*/
arts_warning("bad md5 secret-cookie obtained from %s - replacing it",
arts_warning("[mcop dispatcher] Bad md5 secret-cookie obtained from %s - replacing it",
globalComm()._interfaceName().c_str());
globalComm().erase("secret-cookie");
@ -390,7 +390,7 @@ Dispatcher::~Dispatcher()
if(Object_base::_objectCount())
{
cerr << "warning: leaving MCOP Dispatcher and still "
cerr << "[mcop dispatcher] warning: leaving MCOP Dispatcher and still "
<< Object_base::_objectCount() << " object references alive." << endl;
list<Object_skel *> which = objectPool.enumerate();
list<Object_skel *>::iterator i;
@ -400,13 +400,13 @@ Dispatcher::~Dispatcher()
if(Type::_typeCount())
{
cerr << "warning: leaving MCOP Dispatcher and still "
cerr << "[mcop dispatcher] warning: leaving MCOP Dispatcher and still "
<< Type::_typeCount() << " types alive." << endl;
}
if(GenericDataPacket::_dataPacketCount())
{
cerr << "warning: leaving MCOP Dispatcher and still "
cerr << "[mcop dispatcher] warning: leaving MCOP Dispatcher and still "
<< GenericDataPacket::_dataPacketCount()
<< " data packets alive." << endl;
}
@ -692,7 +692,7 @@ void Dispatcher::handle(Connection *conn, Buffer *buffer, long messageType)
}
else
{
cerr << "MCOP error: don't know authentication protocol" << endl;
cerr << "[mcop dispatcher] error: don't know authentication protocol" << endl;
cerr << " server offered: ";
for(ai = h.authProtocols.begin(); ai != h.authProtocols.end(); ai++)
cerr << *ai << " ";
@ -775,11 +775,11 @@ void Dispatcher::handle(Connection *conn, Buffer *buffer, long messageType)
/*
* We shouldn't reach this point if everything went all right
*/
cerr << "Fatal communication error with a client" << endl;
cerr << "[mcop dispatcher] Fatal communication error with a client" << endl;
if(conn->connState() != Connection::established)
{
cerr << " Authentication of this client was not successful" << endl;
cerr << " Connection dropped" << endl;
cerr << "[mcop dispatcher] Authentication of this client was not successful" << endl;
cerr << "[mcop dispatcher] Connection dropped" << endl;
conn->drop();
}
}
@ -996,14 +996,14 @@ void Dispatcher::handleCorrupt(Connection *connection)
{
if(connection->connState() != Connection::established)
{
cerr << "received corrupt message on unauthenticated connection" <<endl;
cerr << "[mcop dispatcher] Received corrupt message on unauthenticated connection" <<endl;
cerr << "closing connection." << endl;
connection->drop();
d->serverConnectCondition.wakeAll();
}
else
{
cerr << "WARNING: got corrupt MCOP message !??" << endl;
cerr << "[mcop dispatcher] warning: got corrupt MCOP message !??" << endl;
}
}

@ -205,7 +205,7 @@ static bool publishReferences(SoundServerV2 server,
if(!result && !silent)
{
cerr <<
"Error: Can't add object reference (probably artsd is already running)."
"[artsd] Error: Can't add object reference (probably artsd is already running)."
<< endl <<
" If you are sure it is not already running, remove the relevant files:"
<< endl << endl <<
@ -235,7 +235,7 @@ static void cleanUnusedReferences()
{
int i = 0;
cerr << "There are already artsd objects registered, "
cerr << "[artsd] There are already artsd objects registered, "
"looking if they are active..." << endl;
sleep(1); // maybe an artsd process has just started (give it some time)
@ -247,7 +247,7 @@ static void cleanUnusedReferences()
i += cleanReference("Arts_AudioManager");
if(i)
cerr << "... cleaned " <<i<< " unused mcop global references." << endl;
cerr << "[artsd] ... cleaned " <<i<< " unused mcop global references." << endl;
cerr << endl;
}
@ -347,7 +347,7 @@ int main(int argc, char **argv)
char *wrapper = getenv("STARTED_THROUGH_ARTSWRAPPER");
if (wrapper && !strcmp(wrapper, "2"))
arts_warning(
"Can't set real-time scheduling priority.\n"
"[artsd] Can't set real-time scheduling priority.\n"
"You need to run artswrapper as root or\n"
"setuid root. This means that you will\n"
"likely not be able to produce acceptable\n"
@ -355,7 +355,7 @@ int main(int argc, char **argv)
if (wrapper && !strcmp(wrapper, "3"))
arts_warning(
"This system has no support for real-time\n"
"[artsd] This system has no support for real-time\n"
"scheduling priority. This means that you\n"
"will likely not be able to produce acceptable\n"
"sound (i.e. without clicks and breaks).");

Loading…
Cancel
Save