Add startup/shutdown console prints
This commit is contained in:
parent
898b56fc76
commit
789338c8e1
@ -53,6 +53,10 @@ bool RpcServer::registerService(::google::protobuf::Service *service,
|
|||||||
qDebug("The server is running on %s: %d",
|
qDebug("The server is running on %s: %d",
|
||||||
qPrintable(serverAddress().toString()),
|
qPrintable(serverAddress().toString()),
|
||||||
serverPort());
|
serverPort());
|
||||||
|
fprintf(stderr, "Ready to send traffic! Listening on %s:%d ...\n",
|
||||||
|
qPrintable(serverAddress().toString()),
|
||||||
|
serverPort());
|
||||||
|
fflush(stderr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,8 @@ void NoMsgHandler(QtMsgType type, const QMessageLogContext &context,
|
|||||||
|
|
||||||
void cleanup(int /*signum*/)
|
void cleanup(int /*signum*/)
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "\nCleaning up ... (may take a few seconds) ... ");
|
||||||
|
fflush(stderr);
|
||||||
QCoreApplication::instance()->exit(-1);
|
QCoreApplication::instance()->exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +56,9 @@ int main(int argc, char *argv[])
|
|||||||
int exitCode = 0;
|
int exitCode = 0;
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
|
|
||||||
|
fprintf(stderr, "Starting (will take a few seconds) ...\n");
|
||||||
|
fflush(stderr);
|
||||||
|
|
||||||
app.setApplicationName("Drone");
|
app.setApplicationName("Drone");
|
||||||
app.setOrganizationName("Ostinato");
|
app.setOrganizationName("Ostinato");
|
||||||
|
|
||||||
@ -113,6 +118,9 @@ _exit:
|
|||||||
|
|
||||||
google::protobuf::ShutdownProtobufLibrary();
|
google::protobuf::ShutdownProtobufLibrary();
|
||||||
|
|
||||||
|
fprintf(stderr, "done.\n");
|
||||||
|
fflush(stderr);
|
||||||
|
|
||||||
return exitCode;
|
return exitCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user