Overview   API Reference  

log.hpp

00001 #if !defined(__SYSTEM_LOG_HPP__)
00002 #define __SYSTEM_LOG_HPP__
00003 
00004 //
00005 // standard includes
00006 //
00007 #include <stdarg.h>
00008 #include <cstdio>
00009 
00010 //
00011 // local includes
00012 //
00013 #include "core/util/attributes.hpp"
00014 
00015 namespace L4 { namespace vmm
00016 {
00020     struct log
00021     {
00022         //
00023         // functions using the log server
00024         //
00025         static int print(const char *format, ...) __nonnull((1)) __printf(1,2);
00026         static int debug(const char *format, ...) __nonnull((1)) __printf(1,2);
00027         static int info (const char *format, ...) __nonnull((1)) __printf(1,2);
00028         static int warn (const char *format, ...) __nonnull((1)) __printf(1,2);
00029         static int error(const char *format, ...) __nonnull((1)) __printf(1,2);
00030 
00031         static inline int puts(const char *string="") __nonnull_inclass((1))
00032         {
00033             return std::puts(string);
00034         }
00035     };
00036 }}
00037 
00038 //
00039 // FIXME: GCC 3.3 doesn't like this class to be in the global namespace.
00040 //
00041 using namespace L4::vmm;
00042 
00043 #endif
00044 
00045 // ***** end of source ***** //
00046 

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008