//-------------------------------------------------------------------
int main(int argc, char **argv) {
std::string exec = argv[0];
- std::string filetrace = exec.substr(exec.find_last_of("/") + 1) + ".trace";
+ std::string execBN = exec.substr(exec.find_last_of("/") + 1);
+ std::string filetrace = execBN + ".trace";
std::cout << std::endl;
//check command line arguments
<< (ignoreFlags ? "non strict" : "strict") << std::endl;
// Logger and engines:
Logger::setLevel(Logger::Debug);
- Logger::initialize("pcapDecoder", new TraceWriter(filetrace.c_str(), 2048000));
+ Logger::initialize(execBN.c_str(), new TraceWriter(filetrace.c_str(), 2048000));
anna::diameter::codec::Engine *codecEngine =
new anna::diameter::codec::Engine();
anna::diameter::stack::Engine &stackEngine =
out << G_codecMsg.asXMLString();
// Close output file:
out.close();
- std::string msg = "Open 'file.trace' in order to see process traces.\n";
+ std::string msg = "Open '"; msg += filetrace; msg += "' in order to see process traces.\n";
msg += "Open '"; msg += outputFile; msg += "' to see decoding results.";
_exit(msg, 0);
}
// Close output file:
out.close();
- std::string msg = "Open 'file.trace' in order to see process traces.\n";
+ std::string msg = "Open '"; msg += filetrace; msg += "' in order to see process traces.\n";
msg += "Open '"; msg += outputFile; msg += "' to see decoding results.";
_exit(msg, 0);
}