Refer to the Logging Example.
#include <cadex/ACIS_Reader.hxx>
#include <cadex/Base_Logger.hxx>
#include <cadex/Base_LoggerFileAppender.hxx>
#include <cadex/Base_LoggerStreamAppender.hxx>
#include <cadex/LicenseManager_Activate.h>
#include <cadex/ModelData_Model.hxx>
#include <iostream>
#include "../../cadex_license.cxx"
int main (int argc, char *argv[])
{
auto aKey = LicenseKey::Value();
if (!CADExLicense_Activate (aKey)) {
cerr << "Failed to activate CAD Exchanger license." << endl;
return 1;
}
aLogger.
Register (aStreamAppender, Base_Logger::Error, Base_Logger::Fatal);
aLogger.
Register (aFileAppender, Base_Logger::Trace, Base_Logger::Fatal);
if (argc != 2) {
cerr << "Usage: " << argv[0] << " <input_file>, where:" << endl;
cerr << " <input_file> is a name of the .sat file to be read" << endl;
return 1;
}
const char* aSource = argv[1];
cerr << "Failed to read the file " << aSource << endl;
return 1;
}
cerr << "Failed to transfer model data to specified format" << endl;
return 1;
}
return 0;
}