Przeglądaj źródła

Changed log and startup message prefix from "SNF4CGP" to "CGPSNF".


git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@44 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfc
master
adeniz 15 lat temu
rodzic
commit
3f47061355
3 zmienionych plików z 10 dodań i 10 usunięć
  1. 3
    3
      SNF4CGP/ExecutiveProcess.cpp
  2. 3
    3
      SNF4CGP/JobPool.cpp
  3. 4
    4
      SNF4CGP/main.cpp

+ 3
- 3
SNF4CGP/ExecutiveProcess.cpp Wyświetl plik

@@ -66,13 +66,13 @@ void ExecutiveProcess::dispatchWakeupCommand() {
void ExecutiveProcess::notifyQUIT() {
ostringstream O;
O << "* SNF4CGP[" << QuitJobNumber << "] Received QUIT, shutting down..." << endl;
O << "* CGPSNF[" << QuitJobNumber << "] Received QUIT, shutting down..." << endl;
Output.sendString(O.str());
}
void ExecutiveProcess::notifyNOTGOOD() {
ostringstream O;
O << "* SNF4CGP Input stream has gone bad, shutting down..." << endl;
O << "* CGPSNF Input stream has gone bad, shutting down..." << endl;
Output.sendString(O.str());
}
@@ -105,7 +105,7 @@ void ExecutiveProcess::doShutdown() {
shutdownWorkerPool();
shutdownOutput();
shutdownJobPool();
cout << "* SNF4CGP Shutdown completed." << endl;
cout << "* CGPSNF Shutdown completed." << endl;
if(0 < QuitJobNumber) { // If processing ended with QUIT
cout << QuitJobNumber << " OK" << endl; // then respond appropriately.
}

+ 3
- 3
SNF4CGP/JobPool.cpp Wyświetl plik

@@ -32,7 +32,7 @@ void Job::emitComment(const string& Comment) {
}
void Job::generateCommandCommentPrefix(ostringstream& O) {
O << "* SNF4CGP[" << CurrentCommand.Number << "] ";
O << "* CGPSNF[" << CurrentCommand.Number << "] ";
}
void Job::emitOK() {
@@ -104,7 +104,7 @@ void Job::finalize() {
}
void Job::doWakeUp() {
emitComment("SNF4CGP Waking Up");
emitComment("CGPSNF Waking Up");
emitComment(CurrentCommand.Data);
}
@@ -114,7 +114,7 @@ void Job::doINTF() {
void Job::doUNKNOWN() {
ostringstream O;
O << "* SNF4CGP[" << CurrentCommand.Number << "] Does not understand: "
O << "* CGPSNF[" << CurrentCommand.Number << "] Does not understand: "
<< formatAsCGPString(CurrentCommand.Data) << endl;
OutputBuffer.append(O.str());
emitFAILURE();

+ 4
- 4
SNF4CGP/main.cpp Wyświetl plik

@@ -13,13 +13,13 @@
using namespace std; // Introduce standard namespace.
const string SNF4CGP_VERSION_INFO = "SNF4CGP Version 0.1.0 Build: " __DATE__ " " __TIME__;
const string SNF4CGP_VERSION_INFO = "CGPSNF Version 0.1.0 Build: " __DATE__ " " __TIME__;
const int ConfigPathArgNumber = 1;
const int CorrectArgcNumber = 2;
bool CommandLineIsValid(int argc, char*argv[]) { // Validate the command line.
if(CorrectArgcNumber != argc) {
cout << "* SNF4CGP - Bad command line, use SNF4CGP <path_to_config_file>" << endl;
cout << "* CGPSNF - Bad command line, use CGPSNF <path_to_config_file>" << endl;
return false;
}
return true;
@@ -33,10 +33,10 @@ void go(string ConfigurationPath) {
SNF4CGP.doShutdown();
}
catch(exception& e) { // Display standard exceptions.
cout << "* SFN4CGP Exception: " << e.what() << endl;
cout << "* CGPSNF Exception: " << e.what() << endl;
}
catch(...) { // Display unusual exceptions.
cout << "* SNF4CGP Unusual Excetption!" << endl;
cout << "* CGPSNF Unusual Excetption!" << endl;
}
}

Ładowanie…
Anuluj
Zapisz