|
|
|
|
|
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Job::generateCommandCommentPrefix(ostringstream& O) {
|
|
|
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] ";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
void Job::emitOK() {
|
|
|
void Job::emitOK() {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << CurrentCommand.Number << " OK" << endl;
|
|
|
O << CurrentCommand.Number << " OK" << endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Job::emitLogComment() {
|
|
|
void Job::emitLogComment() {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] Comment: " << ScanResultConfiguration.LogComment << endl;
|
|
|
|
|
|
|
|
|
generateCommandCommentPrefix(O);
|
|
|
|
|
|
O << "Comment: " << ScanResultConfiguration.LogComment << endl;
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
void Job::emitXMLLogData() {
|
|
|
void Job::emitXMLLogData() {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] XML Scan log data: " << endl;
|
|
|
|
|
|
|
|
|
generateCommandCommentPrefix(O);
|
|
|
|
|
|
O << "XML Scan log data: " << endl;
|
|
|
convertLogLinesToComments(O, XMLLogData);
|
|
|
convertLogLinesToComments(O, XMLLogData);
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
void Job::emitClassicLogData() {
|
|
|
void Job::emitClassicLogData() {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] Classic Scan log data: " << endl;
|
|
|
|
|
|
|
|
|
generateCommandCommentPrefix(O);
|
|
|
|
|
|
O << "Classic Scan log data: " << endl;
|
|
|
convertLogLinesToComments(O, ClassicLogData);
|
|
|
convertLogLinesToComments(O, ClassicLogData);
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Job::emitMessageMovedTo(string& Destination) {
|
|
|
void Job::emitMessageMovedTo(string& Destination) {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] Moved message to " << Destination << endl;
|
|
|
|
|
|
|
|
|
generateCommandCommentPrefix(O);
|
|
|
|
|
|
O << "Moved message to " << Destination << endl;
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Job::emitException(const string& What) {
|
|
|
void Job::emitException(const string& What) {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] Exception: " << What << endl;
|
|
|
|
|
|
|
|
|
generateCommandCommentPrefix(O);
|
|
|
|
|
|
O << "Exception: " << What << endl;
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
void Job::emitUnknownException() {
|
|
|
void Job::emitUnknownException() {
|
|
|
ostringstream O;
|
|
|
ostringstream O;
|
|
|
O << "* SNF4CGP[" << CurrentCommand.Number << "] Unknown Exception!" << endl;
|
|
|
|
|
|
|
|
|
generateCommandCommentPrefix(O);
|
|
|
|
|
|
O << "Unknown Exception!" << endl;
|
|
|
OutputBuffer.append(O.str());
|
|
|
OutputBuffer.append(O.str());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|