32 |
_taskManager = new TaskManager(); |
_taskManager = new TaskManager(); |
33 |
configFilePath = "/etc/smsdaemon.conf"; |
configFilePath = "/etc/smsdaemon.conf"; |
34 |
_configFile = new ConfigFile(); |
_configFile = new ConfigFile(); |
35 |
|
|
36 |
|
daemonized = false; |
37 |
} |
} |
38 |
|
|
39 |
|
|
74 |
out << ":" << setw(2) << setfill('0') << now.tm_sec; |
out << ":" << setw(2) << setfill('0') << now.tm_sec; |
75 |
out << " " << msg << endl; |
out << " " << msg << endl; |
76 |
|
|
77 |
if (this->isDaemon && _logFile != "") |
if (this->isDaemon && _logFile != "" && daemonized) |
78 |
{ |
{ |
79 |
seteuid(0); |
seteuid(0); |
80 |
ofstream of( _logFile.c_str(), ios_base::out | ios_base::app | ios_base::ate);//append mode |
ofstream of( _logFile.c_str(), ios_base::out | ios_base::app | ios_base::ate);//append mode |