|
μHAL (v2.7.9)
Part of the IPbus software repository
|
Go to the documentation of this file.
2 #ifndef _uhal_log_LogLevels_hpp_
3 #define _uhal_log_LogLevels_hpp_
15 #define UHAL_LOG_INSERT_WARNING warning
17 #define UHAL_LOG_INSERT_WARNING deprecated
25 void insert ( std::ostream& aStr ,
const U& aU )
30 __attribute__ ( (
UHAL_LOG_INSERT_WARNING (
"Insertion of integer types can result in implicit casts. Consider using the Integer() formatter instead" ) ) )
31 void
insert ( std::ostream& aStr , const uint32_t& aUint ) ;
33 __attribute__ ( (
UHAL_LOG_INSERT_WARNING ( "Insertion of integer types can result in implicit casts. Consider using the
Integer() formatter instead" ) ) )
34 void insert ( std::ostream& aStr , const int32_t& aInt );
36 __attribute__ ( (
UHAL_LOG_INSERT_WARNING ( "Insertion of
boolean types can result in implicit casts. Consider using the Boolean() formatter instead" ) ) )
37 void insert ( std::ostream& aStr , const
bool& aBool );
40 template< typename T >
44 typedef void ( *fPtr ) ( std::ostream& aStr );
46 BaseLogLevel ( std::ostream& aStr , fPtr aHeadFunction , fPtr aTailFunction ) :
48 mHeadFunction ( aHeadFunction ),
49 mTailFunction ( aTailFunction )
55 return static_cast<T&
> ( *this );
60 mHeadFunction ( mStr );
61 return static_cast<T&
> ( *this );
66 mTailFunction ( mStr );
67 return static_cast<T&
> ( *this );
Helper struct representing the Notice log level to allow us to specialize functions according to thei...
WarningLevel(std::ostream &aStr=std::cout, Base::fPtr aHeadFunction=WarningLevel::colour_head, Base::fPtr aTailFunction=WarningLevel::colour_tail)
InfoLevel(std::ostream &aStr=std::cout, Base::fPtr aHeadFunction=InfoLevel::colour_head, Base::fPtr aTailFunction=InfoLevel::colour_tail)
static void colour_head(std::ostream &aStr)
BaseLogLevel(std::ostream &aStr, fPtr aHeadFunction, fPtr aTailFunction)
BaseLogLevel< ErrorLevel > Base
static void colour_tail(std::ostream &aStr)
static void colour_head(std::ostream &aStr)
Helper struct representing the Fatal log level to allow us to specialize functions according to their...
static void colour_tail(std::ostream &aStr)
void insert(std::ostream &aStr, const U &aU)
static void colour_tail(std::ostream &aStr)
BaseLogLevel< WarningLevel > Base
FatalLevel(std::ostream &aStr=std::cout, Base::fPtr aHeadFunction=FatalLevel::colour_head, Base::fPtr aTailFunction=FatalLevel::colour_tail)
static void colour_head(std::ostream &aStr)
NoticeLevel(std::ostream &aStr=std::cout, Base::fPtr aHeadFunction=NoticeLevel::colour_head, Base::fPtr aTailFunction=NoticeLevel::colour_tail)
static void colour_tail(std::ostream &aStr)
BaseLogLevel< NoticeLevel > Base
BaseLogLevel< InfoLevel > Base
#define UHAL_LOG_INSERT_WARNING
static void colour_tail(std::ostream &aStr)
ErrorLevel(std::ostream &aStr=std::cout, Base::fPtr aHeadFunction=ErrorLevel::colour_head, Base::fPtr aTailFunction=ErrorLevel::colour_tail)
_Integer< T, IntFmt<> > Integer(const T &aT)
Forward declare a function which creates an instance of the ultra-lightweight wrapper from an integer...
static void colour_tail(std::ostream &aStr)
Helper struct representing the Warning log level to allow us to specialize functions according to the...
Helper struct representing the Info log level to allow us to specialize functions according to their ...
static void colour_head(std::ostream &aStr)
static void colour_head(std::ostream &aStr)
BaseLogLevel< DebugLevel > Base
DebugLevel(std::ostream &aStr=std::cout, Base::fPtr aHeadFunction=DebugLevel::colour_head, Base::fPtr aTailFunction=DebugLevel::colour_tail)
Helper struct representing the Debug log level to allow us to specialize functions according to their...
static void colour_head(std::ostream &aStr)
BaseLogLevel< FatalLevel > Base
Helper struct representing the Error log level to allow us to specialize functions according to their...
void(* fPtr)(std::ostream &aStr)