Changeset 1601 for XIOS/dev/dev_trunk_omp/src/log.cpp
- Timestamp:
- 11/19/18 15:52:54 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/log.cpp
r523 r1601 1 1 #include "log.hpp" 2 #include <string> 3 #include <iostream> 4 #include <string> 2 5 3 6 namespace xios 4 7 { 8 std::filebuf* info_FB[16]; 9 10 5 11 CLog info("info") ; 6 12 CLog report("report") ; 7 13 CLog error("error", cerr.rdbuf()) ; 14 15 16 CLog& CLog::operator()(int l) 17 { 18 if (l<=level) 19 { 20 omp_set_lock( &mutex ); 21 rdbuf(strBuf_array[omp_get_thread_num()]); 22 *this<<"-> "<<name<<" : " ; 23 omp_unset_lock( &mutex ); 24 } 25 else rdbuf(NULL) ; 26 return *this; 27 } 8 28 }
Note: See TracChangeset
for help on using the changeset viewer.