/[projects]/smsdaemon/Common.cpp
ViewVC logotype

Diff of /smsdaemon/Common.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 146 by torben, Sun Dec 7 20:06:12 2008 UTC revision 150 by torben, Sun Dec 7 21:42:15 2008 UTC
# Line 32  Common::Common() Line 32  Common::Common()
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    
# Line 72  void Common::logMessage(string msg) Line 74  void Common::logMessage(string msg)
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

Legend:
Removed from v.146  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.20