Go to the source code of this file.
Functions | |
main () |
You have permission to use this software without restriction on two conditions:
1. You must preserve this copyright notice in this software and any software derived from it.
2. You accept any risk entailed in using this software. By using this software, you acknowledge that you have a sophisticated background in software engineering and understand the way this software functions. You further acknowledge that using this software may result in the irretrievable loss of important e-email and you alone are responsible for this loss.If either of these conditions are unacceptable, you may not use any part of this software.
Definition in file main.C.
Function Documentation
|
Definition at line 34 of file main.C. References Logger::getLogger(), SpamParameters::hasFlag(), Logger::log(), and Logger::setDebug().
00035 { 00036 Logger log = pLogger->getLogger("main"); 00037 // This message will only appear if in the log file if 00038 // debug is turned on in the Logger constructor. Otherwise it 00039 // is turned on by a parameter file flag. 00040 log.log(Logger::DEBUG, "main", "start mail_filter"); 00041 try { 00042 const char *PARAMFILE_NAME = "SpamFilterParams"; 00043 // read the parameter file 00044 SpamParameters spamParam(PARAMFILE_NAME); 00045 00046 if (spamParam.hasFlag("debug")) { 00047 // turn debugging on in the logger 00048 log.setDebug(); 00049 } 00050 // filter the email from stdin 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 } |