Last change
on this file since 1614 was
1342,
checked in by yushan, 7 years ago
|
log files
|
-
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
|
Rev | Line | |
---|
[300] | 1 | #include "log.hpp" |
---|
[1342] | 2 | #include <string> |
---|
| 3 | #include <iostream> |
---|
| 4 | #include <string> |
---|
[300] | 5 | |
---|
[335] | 6 | namespace xios |
---|
[300] | 7 | { |
---|
[1342] | 8 | std::filebuf* info_FB[16]; |
---|
| 9 | |
---|
| 10 | |
---|
[347] | 11 | CLog info("info") ; |
---|
| 12 | CLog report("report") ; |
---|
[523] | 13 | CLog error("error", cerr.rdbuf()) ; |
---|
[1342] | 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 | } |
---|
[300] | 28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.