![]() |
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 // 00004 // Thanks to Jim Tilander for many helpful hints. 00005 00006 #ifndef __LOGGER_H 00007 #define __LOGGER_H 00008 00009 #include <stdarg.h> 00010 #include <dolfin/constants.h> 00011 #include <dolfin/GenericLogger.h> 00012 00013 namespace dolfin { 00014 00015 class Logger { 00016 public: 00017 00018 Logger(); 00019 ~Logger(); 00020 00021 void info (const char* msg); 00022 void info (const char* format, va_list aptr); 00023 00024 void debug (const char* file, unsigned long line, const char* function, const char* format, ...); 00025 void warning (const char* file, unsigned long line, const char* function, const char* format, ...); 00026 void error (const char* file, unsigned long line, const char* function, const char* format, ...); 00027 void dassert (const char* file, unsigned long line, const char* function, const char* format, ...); 00028 void progress(const char* title, const char* label, real p); 00029 00030 void update(); 00031 void quit(); 00032 bool finished(); 00033 00034 void progress_add (Progress* p); 00035 void progress_remove (Progress *p); 00036 00037 void start(); 00038 void end(); 00039 00040 void active(bool state); 00041 00042 private: 00043 00044 void init(); 00045 00046 GenericLogger* log; 00047 char* buffer; 00048 char* location; 00049 bool state; 00050 00051 }; 00052 00053 } 00054 00055 #endif
Documentation automatically generated with Doxygen on 10 Sep 2004.