00001 // OSB library ********************************************* -*- C++ -*- 00006 /* 00007 AUTHOR(S): Stephan Broennimann (vb) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.3 $ 00012 00013 License 00014 OSB rating and billing library for communication networks 00015 Copyright (C) 2004, 2005, 2006 OSB systems 00016 00017 This file may be distributed and/or modify under the terms of the 00018 GNU General Public License (GPL) as published by the Free Software 00019 Foundation which is provided in the file LICENSE.GPL included in the 00020 packaging of this file. 00021 00022 The file is distributed in the hope that it will be useful, but WITHOUT 00023 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00024 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00025 for more details. 00026 00027 Holders of a OSB Commercial License may use this file under the terms 00028 and conditions of this commercial license. 00029 */ 00030 00031 #ifndef _CORBALOG_H_ 00032 #define _CORBALOG_H_ 00033 00034 // ************************************************************************ 00035 // included header files 00036 // + standard includes 00037 #include <iosfwd> 00038 #include <string> 00039 00040 // + libraries 00041 00042 // + local headers 00043 00044 // + class declarations 00045 namespace OSB_LIB { 00046 class BaseError; 00047 } 00048 00049 // ************************************************************************ 00050 // namespace extensions 00051 namespace OSB_CORBA { 00052 00054 enum LogLevel { 00056 WARN = 3, // OSB_DL2 00058 INFO = 4, // OSB_DL1 00060 DBG1 = 5, // OSB_DL3 00062 DBG2 = 6 // OSB_DL4 00063 }; 00064 00066 void logMsg( 00067 LogLevel level, 00068 const std::string& ifc, 00069 const std::string& fct, 00070 const std::string& msg 00071 ); 00072 00074 void logMsg( 00075 LogLevel level, 00076 const std::string& ifc, 00077 const std::string& fct, 00078 const OSB_LIB::BaseError& error 00079 ); 00080 00082 void logMsg( 00083 LogLevel level, 00084 const std::string& ifc, 00085 const std::string& fct, 00086 const std::ostringstream& msg 00087 ); 00088 00089 00095 void logException( 00096 const std::string& appName, 00097 bool catchAll 00098 ); 00099 } // namespace OSB_CORBA 00100 00101 #endif // _CORBALOG_H_