31 const char*
const LOG_FILE = EVEMU_ROOT
"/log/eve-tool.log";
34 int main(
int argc,
char* argv[] )
36 #if defined( HAVE_CRTDBG_H ) && !defined( NDEBUG )
38 _CrtSetDbgFlag( _CRTDBG_LEAK_CHECK_DF | _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) );
48 sLog.Warning(
"init",
"Unable to open log file '%s', only logging to the screen now.",
LOG_FILE );
56 for(; argc > 0; --argc, ++argv)
61 sLog.Log(
"shutdown",
"Exiting." );
82 char input = fgetc( file );
84 if(
'\n' == input || EOF == input )
107 FILE* file = fopen( filename.c_str(),
"r" );
110 sLog.Error(
"input",
"Unable to open script '%s'.", filename.c_str() );
114 sLog.Log(
"input",
"Queuing commands from script '%s'.", filename.c_str() );
118 sLog.Success(
"input",
"Load of script '%s' successfully completed.", filename.c_str() );
120 sLog.Error(
"input",
"Error occured while reading script '%s'.", filename.c_str() );
bool load_log_settings(const char *filename)
bool log_open_logfile(const char *filename)
Separates string to arguments.
#define sLog
Evaluates to a NewLog instance.
void ProcessCommand(const Seperator &cmd)
Processed given command.