Last change
on this file since 2424 was
1601,
checked in by yushan, 6 years ago
|
branch_openmp merged with trunk r1597
|
-
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:
495 bytes
|
Line | |
---|
1 | #include "log.hpp" |
---|
2 | #include <string> |
---|
3 | #include <iostream> |
---|
4 | #include <string> |
---|
5 | |
---|
6 | namespace xios |
---|
7 | { |
---|
8 | std::filebuf* info_FB[16]; |
---|
9 | |
---|
10 | |
---|
11 | CLog info("info") ; |
---|
12 | CLog report("report") ; |
---|
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 | } |
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.