Oops, logFileName is a class member and not a local
variable...prepending it with the logs_dir is not ok.
void
Bot::set_log_file (String name)
{
- logFileName = logs_dir + name;
+ logFileName = name;
logFile.close ();
logFile.clear ();
#if HAVE_IOSBASE
- logFile.open(logFileName.c_str (), std::ios_base::out |
+ logFile.open((logs_dir + logFileName).c_str (), std::ios_base::out |
std::ios_base::ate | std::ios_base::app);
#else
- logFile.open(logFileName.c_str (), ios::out | ios::ate
+ logFile.open((logs_dir + logFileName).c_str (), ios::out | ios::ate
| ios::app);
#endif