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

Diff of /smsdaemon/Logger.cpp

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

revision 694 by torben, Thu Apr 29 18:04:10 2010 UTC revision 1011 by torben, Thu Aug 5 06:53:38 2010 UTC
# Line 69  namespace Logger Line 69  namespace Logger
69    
70                  ostringstream out;                  ostringstream out;
71    
72                  out << Months[ now.tm_mon ] << " " << setw(2) << setfill('0') << now.tm_mday;                  
73                    out << (1900+now.tm_year) << "-" << setw(2) << setfill('0') << (now.tm_mon+1) << "-" << setw(2) << setfill('0') << now.tm_mday;
74                  out << " " << setw(2) << setfill('0') << now.tm_hour;                  out << " " << setw(2) << setfill('0') << now.tm_hour;
75                  out << ":" << setw(2) << setfill('0') << now.tm_min;                  out << ":" << setw(2) << setfill('0') << now.tm_min;
76                  out << ":" << setw(2) << setfill('0') << now.tm_sec;                  out << ":" << setw(2) << setfill('0') << now.tm_sec;
# Line 102  namespace Logger Line 103  namespace Logger
103                          syslog(LOG_INFO, "%s", msg.c_str());                          syslog(LOG_INFO, "%s", msg.c_str());
104                  }                  }
105          }          }
106    
107            std::string getLog()
108            {
109                    std::ostringstream oss;
110                    for (unsigned i=0; i<logBuffer.size(); i++) {
111                            oss << logBuffer[i];
112                    }
113    
114                    return oss.str();
115            }
116  }  }

Legend:
Removed from v.694  
changed lines
  Added in v.1011

  ViewVC Help
Powered by ViewVC 1.1.20