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