Changeset 2341
- Timestamp:
- 06/29/22 18:08:55 (11 months ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/log.hpp
r523 r2341 5 5 #include <iostream> 6 6 #include <string> 7 #include "log_type.hpp" 7 8 8 9 namespace xios … … 25 26 return *this; 26 27 } 28 29 CLog& operator()(CLogType& logType) 30 { 31 if (logSetting==nullptr) setLogSetting() ; 32 if (logSetting->isSet(logType)) 33 { 34 rdbuf(strBuf_); 35 *this<<"-> "<<name<<" : " ; 36 } 37 else rdbuf(NULL) ; 38 return *this; 39 } 40 27 41 void setLevel(int l) {level=l; } 28 42 int getLevel() {return level ;} 29 43 bool isActive(void) { if (rdbuf()==NULL) return true ; else return false ;} 30 44 bool isActive(int l) {if (l<=level) return true ; else return false ; } 45 bool isActive(CLogType& logType) {if (logSetting==nullptr) setLogSetting() ; if (logSetting->isSet(logType)) return true; else return false; } 31 46 32 47 public: … … 51 66 string name ; 52 67 std::streambuf* strBuf_; 68 69 void setLogSetting(void) {logSetting = new CSetLog ;} 70 71 CSetLog* logSetting = nullptr ; 53 72 }; 54 73
Note: See TracChangeset
for help on using the changeset viewer.