Changeset 2193
- Timestamp:
- 06/18/03 11:17:22 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MLog.cc
r2173 r2193 93 93 // 94 94 ////////////////////////////////////////////////////////////////////////////// 95 96 95 #include "MLog.h" 97 96 98 #include <stdlib.h> // mkstempe 97 #include <stdlib.h> // mkstemp 98 99 99 #include <fstream> 100 #include <iomanip> 101 100 102 #ifdef _REENTRANT 101 103 #include <pthread.h> 102 104 #endif 103 105 #include <TGTextView.h> 104 105 #include "MLogManip.h"106 106 107 107 ClassImp(MLog); -
trunk/MagicSoft/Mars/mbase/MLogManip.h
r2173 r2193 14 14 inline std::ostream &operator<<(std::ostream &lout, MLogManip u) 15 15 { 16 MLog *log= /*<dynamic_cast>*/(MLog*)lout.rdbuf();16 MLog *log=dynamic_cast<MLog*>(lout.rdbuf()); 17 17 if (log) 18 18 log->Underline(); … … 25 25 struct _Debug { int level; }; 26 26 27 const _Debug all = { 0 }; // use this for output in any case 28 const _Debug err = { 1 }; // use this for fatal errors (red) 29 const _Debug warn = { 2 }; // use this for wrnings (yellow) 30 const _Debug inf = { 3 }; // use this for informations (green) 31 const _Debug dbg = { 4 }; // use this for debug messages (blue) 32 27 33 inline _Debug debug(int level) 28 34 { … … 34 40 inline std::ostream &operator<<(std::ostream &lout, _Debug d) 35 41 { 36 MLog *log= /*<dynamic_cast>*/(MLog*)lout.rdbuf();42 MLog *log=dynamic_cast<MLog*>(lout.rdbuf()); 37 43 if (log) 38 44 log->SetOutputLevel(d.level); … … 53 59 inline std::ostream &operator<<(std::ostream &lout, _EnableDev e) 54 60 { 55 MLog *log= /*<dynamic_cast>*/(MLog*)lout.rdbuf();61 MLog *log=dynamic_cast<MLog*>(lout.rdbuf()); 56 62 if (log) 57 63 log->EnableOutputDevice(e.dev); … … 72 78 inline std::ostream &operator<<(std::ostream &lout, _DisableDev d) 73 79 { 74 MLog *log= /*<dynamic_cast>*/(MLog*)lout.rdbuf();80 MLog *log=dynamic_cast<MLog*>(lout.rdbuf()); 75 81 if (log) 76 82 log->EnableOutputDevice(d.dev); … … 82 88 #ifndef __CINT__ 83 89 #define dbginf __FILE__ << " l." << dec << __LINE__ << ": " 84 #define all debug(0) // use this for output in any case85 #define err debug(1) // use this for fatal errors (red)86 #define warn debug(2) // use this for wrnings (yellow)87 #define inf debug(3) // use this for informations (green)88 #define dbg debug(4) // use this for debug messages (blue)89 90 #endif 90 91
Note:
See TracChangeset
for help on using the changeset viewer.