sbuild-log.h

Go to the documentation of this file.
00001 /* Copyright © 2005-2007  Roger Leigh <rleigh@debian.org>
00002  *
00003  * schroot is free software: you can redistribute it and/or modify it
00004  * under the terms of the GNU General Public License as published by
00005  * the Free Software Foundation, either version 3 of the License, or
00006  * (at your option) any later version.
00007  *
00008  * schroot is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see
00015  * <http://www.gnu.org/licenses/>.
00016  *
00017  *********************************************************************/
00018 
00019 #ifndef SBUILD_LOG_H
00020 #define SBUILD_LOG_H
00021 
00022 #include <ostream>
00023 
00024 namespace sbuild
00025 {
00026 
00028   enum DebugLevel
00029     {
00030       DEBUG_NONE = -1,   
00031       DEBUG_NOTICE = 1,  
00032       DEBUG_INFO = 2,    
00033       DEBUG_WARNING = 3, 
00034       DEBUG_CRITICAL = 4 
00035     };
00036 
00042   std::ostream&
00043   log_info ();
00044 
00050   std::ostream&
00051   log_warning ();
00052 
00058   std::ostream&
00059   log_error ();
00060 
00069   std::ostream&
00070   log_debug (DebugLevel level);
00071 
00077   std::ostream&
00078   log_ctty_info ();
00079 
00085   std::ostream&
00086   log_ctty_warning ();
00087 
00093   std::ostream&
00094   log_ctty_error ();
00095 
00101   void
00102   log_exception_warning (std::exception const& e);
00103 
00109   void
00110   log_exception_error (std::exception const& e);
00111 
00117   void
00118   log_ctty_exception_warning (std::exception const& e);
00119 
00125   void
00126   log_ctty_exception_error (std::exception const& e);
00127 
00131   void
00132   log_unknown_exception_error ();
00133 
00135   extern DebugLevel debug_level;
00136 
00137 }
00138 
00139 #endif /* SBUILD_LOG_H */
00140 
00141 /*
00142  * Local Variables:
00143  * mode:C++
00144  * End:
00145  */

Generated on Sat Jul 5 11:58:47 2008 for sbuild by  doxygen 1.5.6