00001
00027 #include "SpamException.h"
00028 #include "SpamParameters.h"
00029 #include "Logger.h"
00030 #include "MailFilter.h"
00031
00034 main()
00035 {
00036 Logger log = pLogger->getLogger("main");
00037
00038
00039
00040 log.log(Logger::DEBUG, "main", "start mail_filter");
00041 try {
00042 const char *PARAMFILE_NAME = "SpamFilterParams";
00043
00044 SpamParameters spamParam(PARAMFILE_NAME);
00045
00046 if (spamParam.hasFlag("debug")) {
00047
00048 log.setDebug();
00049 }
00050
00051 MailFilter filter( spamParam );
00052 }
00053 catch (SpamException e) {
00054 log.log( Logger::ERROR, "main", e.what() );
00055 }
00056 log.log(Logger::DEBUG, "main", "end mail_filter");
00057 return 0;
00058 }