Back to index

salome-med  6.5.0
Log.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef _LOG_H_
00021 #define _LOG_H_
00022 
00036 
00037 #ifndef LOG_LEVEL
00038 #define LOG_LEVEL 0
00039 #endif
00040 
00041 #if LOG_LEVEL > 0
00042 
00043 #include <iostream>
00044 
00046 #define LOG(x, msg) if(x <= LOG_LEVEL) std::cout << msg << std::endl; 
00047 #define LOG3( x , msg1 , msg2 ) if(x <= LOG_LEVEL) std::cout << msg1, msg2 << std::endl; 
00048 
00049 #else
00050 
00051 #define LOG( x , msg )
00052 #define LOG3( x , msg1 , msg2 )
00053 
00054 #endif
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 #endif