Last change
on this file since 1145 was
1134,
checked in by yushan, 7 years ago
|
branch merged with trunk r1130
|
-
Property copyright set to
Software name : XIOS (Xml I/O Server) http://forge.ipsl.jussieu.fr/ioserver Creation date : January 2009 Licence : CeCCIL version2 see license file in root directory : Licence_CeCILL_V2-en.txt or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement) CNRS/IPSL (Institut Pierre Simon Laplace) Project Manager : Yann Meurdesoif yann.meurdesoif@cea.fr
-
Property svn:eol-style set to
native
|
File size:
595 bytes
|
Line | |
---|
1 | #include "log.hpp" |
---|
2 | #include <string> |
---|
3 | #include <iostream> |
---|
4 | #include <string> |
---|
5 | |
---|
6 | namespace xios |
---|
7 | { |
---|
8 | |
---|
9 | std::filebuf* info_FB[10]; |
---|
10 | |
---|
11 | |
---|
12 | CLog info("info") ; |
---|
13 | CLog report("report") ; |
---|
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 | |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.