]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - LogFile.h
Use solver to check for problems and produce a list of package transactions
[cygwin-apps/setup.git] / LogFile.h
index b241fe680781e13c6b22f6e8c281e9a88ce36705..ddbc2dcd36408a764777e709d8d23ad9210f404c 100644 (file)
--- a/LogFile.h
+++ b/LogFile.h
@@ -13,6 +13,9 @@
  *
  */
 
+#ifndef SETUP_LOGFILE_H
+#define SETUP_LOGFILE_H
+
 #include "LogSingleton.h"
 #include <sstream>
 
@@ -22,13 +25,19 @@ public:
   static LogFile *createLogFile();
   LogFile();
   void clearFiles(); // delete all target filenames
-  void setFile (int minlevel, String const &path, bool append);
-  String getFileName (int level) const;
+  void setFile (int minlevel, const std::string& path, bool append);
+  std::string getFileName (int level) const;
+
+  static void setExitMsg (int msg) { exit_msg = msg; }
+  static int getExitMsg () { return exit_msg; }
+
   /* Some platforms don't call destructors. So this call exists
    * which guarantees to flush any log data...
    * but doesn't call generic C++ destructors
    */
-  virtual void exit (int const exit_code) __attribute__ ((noreturn));
+  virtual void exit (int exit_code, bool show_end_install_msg = true)
+         __attribute__ ((noreturn));
+  virtual void flushAll ();
   virtual ~LogFile();
   // get a specific verbosity stream.
   virtual std::ostream &operator() (enum log_level level);
@@ -38,6 +47,10 @@ protected:
   LogFile (LogFile const &); // no copy constructor
   LogFile &operator = (LogFile const&); // no assignment operator
   virtual void endEntry(); // the current in-progress entry is complete.
+  static int exit_msg;
 private:
-  void log_save (int babble, String const &filename, bool append);
+  void log_save (int babble, const std::string& filename, bool append);
 };
+
+#define Logger() ((LogFile &) LogSingleton::GetInstance ())
+#endif /* SETUP_LOGFILE_H */
This page took 0.02356 seconds and 5 git commands to generate.