]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - LogSingleton.h
Suppress bogus free-nonheap-object warning in iniparse.cc
[cygwin-apps/setup.git] / LogSingleton.h
index 9e596e6a29147ed59e3fe7e6efa4b701b547ab93..ffed69dec7f1aacea9909c89aee941190ca06698 100644 (file)
  *
  */
 
-#ifndef   _LOGSINGLETON_H_
-#define   _LOGSINGLETON_H_
+#ifndef SETUP_LOGSINGLETON_H
+#define SETUP_LOGSINGLETON_H
 
-#include "String++.h"
 #include <iostream>
 
 enum log_level {
@@ -37,7 +36,7 @@ public:
    * which guarantees to flush any log data...
    * but doesn't call generic C++ destructors
    */
-  __attribute__ ((noreturn)) virtual void exit (int const exit_code) = 0;
+  __attribute__ ((noreturn)) virtual void exit (int, bool = true) = 0;
   virtual ~LogSingleton();
   // get a specific verbosity stream.
   virtual std::ostream &operator() (enum log_level level) = 0;
@@ -45,7 +44,7 @@ public:
   friend std::ostream& endLog(std::ostream& outs);
   
 protected:
-  LogSingleton(); // Only child classs can be created.
+  LogSingleton(std::streambuf* aStream); // Only child classs can be created.
   LogSingleton (LogSingleton const &); // no copy constructor
   LogSingleton &operator = (LogSingleton const&); // no assignment operator
   virtual void endEntry() = 0; // the current in-progress entry is complete.
@@ -55,7 +54,11 @@ private:
 
 /* End of a Log comment */
 extern std::ostream& endLog(std::ostream& outs);
-//extern ostream& endLog(ostream& outs);
 
-#define log(X) LogSingleton::GetInstance()(X)
-#endif /* _LOGSINGLETON_H_ */
+#define Log(X) (LogSingleton::GetInstance ()(X))
+
+// Log adapators for printf-style output
+void LogBabblePrintf(const char *fmt, ...);
+void LogPlainPrintf(const char *fmt, ...);
+
+#endif /* SETUP_LOGSINGLETON_H */
This page took 0.025496 seconds and 5 git commands to generate.